AD10 - Hunting Sasquatch: Finding Intermittent Issues Using - - PDF document

ad10 hunting sasquatch finding intermittent issues using
SMART_READER_LITE
LIVE PREVIEW

AD10 - Hunting Sasquatch: Finding Intermittent Issues Using - - PDF document

AD10 Agile Testing & Test Automation 11:45 AM AD10 - Hunting Sasquatch: Finding Intermittent Issues Using Periodic Automation


slide-1
SLIDE 1

¡ ¡ ¡ ¡ AD10 ¡

Agile ¡Testing ¡& ¡Test ¡Automation ¡ 11:45 ¡AM ¡ ¡ ¡ ¡

AD10 ¡-­‑ ¡Hunting ¡Sasquatch: ¡Finding ¡ Intermittent ¡Issues ¡Using ¡Periodic ¡ Automation ¡ ¡

Presented ¡by: ¡ ¡ ¡ ¡

Paul ¡Grizzaffi ¡

¡ ¡Magenic ¡ ¡

Brought ¡to ¡you ¡by: ¡ ¡ ¡ ¡

¡

¡

¡ ¡

888-­‑-­‑-­‑268-­‑-­‑-­‑8770 ¡·√·√ ¡904-­‑-­‑-­‑278-­‑-­‑-­‑0524 ¡-­‑ ¡info@techwell.com ¡-­‑ ¡https://agiledevopswest.techwell.com/ ¡

¡

slide-2
SLIDE 2

¡

Paul ¡Grizzaffi ¡

¡ As ¡a ¡Principal ¡Automation ¡Architect ¡at ¡Magenic, ¡Paul ¡Grizzaffi ¡is ¡following ¡his ¡passion ¡of ¡ providing ¡technology ¡solutions ¡to ¡testing ¡and ¡QA ¡organizations, ¡including ¡automation ¡ assessments, ¡implementations, ¡and ¡through ¡activities ¡benefiting ¡the ¡broader ¡testing ¡

  • community. ¡An ¡accomplished ¡keynote ¡speaker ¡and ¡writer, ¡Paul ¡has ¡spoken ¡at ¡both ¡local ¡

and ¡national ¡conferences ¡and ¡meetings. ¡He ¡is ¡an ¡advisor ¡to ¡Software ¡Test ¡Professionals ¡ and ¡STPCon, ¡as ¡well ¡as ¡a ¡member ¡of ¡the ¡Industry ¡Advisory ¡Board ¡of ¡the ¡Advanced ¡ Research ¡Center ¡for ¡Software ¡Testing ¡and ¡Quality ¡Assurance ¡(STQA) ¡at ¡UT ¡Dallas ¡where ¡ he ¡is ¡a ¡frequent ¡guest ¡lecturer. ¡Paul ¡enjoys ¡sharing ¡his ¡experiences ¡and ¡learning ¡from ¡

  • ther ¡testing ¡professionals; ¡his ¡mostly ¡cogent ¡thoughts ¡can ¡be ¡read ¡on ¡his ¡blog. ¡
slide-3
SLIDE 3

5/28/19 ¡ 1 ¡

@pg pgri rizzaffi #Agile leDe DevOpsCon

I’m Hunting Sasquatch

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Paul Grizzaffi » Principal Automation Architect at Magenic » Career focused on automation » “Software Pediatrician” » Advisor › STPCon › Advanced Research Center for STQA at UT Dallas

Who Is This Guy?

slide-4
SLIDE 4

5/28/19 ¡ 2 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Where Is This Guy?

http://www.linkedin.com/in/paulgrizzaffi @pgrizzaffi http://responsibleautomation.wordpress.com paulg@magenic.com

#Agile leDe DevOpsCon @pg pgri rizzaffi

What’s a Sasquatch?

slide-5
SLIDE 5

5/28/19 ¡ 3 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» “…name given to an ape-like creature that some people believe inhabits forests,

mainly in the Pacific Northwest region of North America”, per Wikipedia

» An issue that never happens when you are looking for it » An issue that the developers don’t believe exists » (We’ll not be discussing the first bullet today)

What’s a Sasquatch?

#Agile leDe DevOpsCon @pg pgri rizzaffi

Integration Hell

slide-6
SLIDE 6

5/28/19 ¡ 4 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Developers A and B write features in separate branches » Common code is modified – more divergent over time » Lots of time spent merging code » Then testing begins…Issues! › Merge issues › Functional issues › Resolve issues › Lather, rinse, repeat » Imagine 10 developers on 5 branches! » Make “Sweet Mother of Merge” release

Integration Hell

#Agile leDe DevOpsCon @pg pgri rizzaffi

slide-7
SLIDE 7

5/28/19 ¡ 5 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Salvation?

#Agile leDe DevOpsCon @pg pgri rizzaffi

» What if we merge and integrate earlier? » Break the problem into smaller chunks › Then we could test earlier › And find defects earlier › Can

Can require less effort to resolve

» “Vote Integrate early and often” » “Continuous integration”

Salvation?

slide-8
SLIDE 8

5/28/19 ¡ 6 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Well Sherman, Martin Fowler says* it’s a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily — leading to multiple integrations per day.

  • Mr. Peabody, what’s

“continuous integration”? Huh?

* http://martinfowler.com/articles/continuousIntegration.html

#Agile leDe DevOpsCon @pg pgri rizzaffi

Basic Continuous Integration Steps

slide-9
SLIDE 9

5/28/19 ¡ 7 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Developer checks in code » Automated compile/build » Automated unit checks » Alert on any failure » Some issues found sooner, easier to address

Basic Continuous Integration Steps

#Agile leDe DevOpsCon @pg pgri rizzaffi

Adding Steps

slide-10
SLIDE 10

5/28/19 ¡ 8 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» As we mature › Automated deploy, provision, etc. › Automated checks (Continuous Testing) › Alert on any failure » More issues found sooner, easier to address

Adding Steps

Succes ess!!! T-S

  • Shirts F

For E Ever eryone, R e, Right? ?

#Agile leDe DevOpsCon @pg pgri rizzaffi Well… OK… Maybe not a COMPLETE fail… …but there are some issues that this approach has difficulty catching.

slide-11
SLIDE 11

5/28/19 ¡ 9 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

What Am I Worried About?

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Configuration changes › Network-related › Tool › System Under Test (SUT) related » Intermittent issues › Periodic maintenance activities › Quirky test environments › Race conditions

What Am I Worried About?

slide-12
SLIDE 12

5/28/19 ¡ 10 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Well Sherman, it’s a condition that occurs when events can be received in non- deterministic order. Gee Mr. Peabody, what’s a race condition? Huh?

#Agile leDe DevOpsCon @pg pgri rizzaffi

What’s A Race Condition?

Callee Defect-free Telecommunications Network Caller

slide-13
SLIDE 13

5/28/19 ¡ 11 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Callee Shifty Telecommunications Network Caller

What’s A Race Condition?

#Agile leDe DevOpsCon @pg pgri rizzaffi

Wait A Minute…

Wouldn’t you have found me during your functional or feature testing?

slide-14
SLIDE 14

5/28/19 ¡ 12 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

What About In This System?

#Agile leDe DevOpsCon @pg pgri rizzaffi

What About In THIS System?

slide-15
SLIDE 15

5/28/19 ¡ 13 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Why Is This So Difficult?

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Humans are flawed creatures » High number of combinations and permutations » 3rd party interaction can be unpredictable » Enumerating is tedious and error prone » Limitations of available people and resources

Why Is This So Difficult?

slide-16
SLIDE 16

5/28/19 ¡ 14 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

In Our Sights…

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Keep running the “on every deploy” scripts » “Periodic Automation” » Periodically rerun the scripts » Increases chance of seeing the elusive beast » Investigate every sighting » Development/Test partnership initiative

In Our Sights…

slide-17
SLIDE 17

5/28/19 ¡ 15 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

An Actual Sighting!

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Issue: return to login screen during purchase » Dev says: It’s fixed now, I can’t reproduce it » Periodic automation reproduces » It must be an automation problem » Gnashing of teeth and rending of cloth » Surprise! Unhandled race condition! » Periodic automation helped

An Actual Sighting!

slide-18
SLIDE 18

5/28/19 ¡ 16 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Beware Failure Fatigue

#Agile leDe DevOpsCon @pg pgri rizzaffi

» It’s “extra work” » Triage effort › ALL results need to be reviewed › Focus on failures, don’t ignore successes › Time is of the essence » Trust issues › “We only see this with automation” › “Did you reproduce this manually?” › “Oh, that scenario fails sometimes, just ignore it” › “Pushing the van back up the hill”

Beware Failure Fatigue

slide-19
SLIDE 19

5/28/19 ¡ 17 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Amusing Anecdote

#Agile leDe DevOpsCon @pg pgri rizzaffi

Desensitization

slide-20
SLIDE 20

5/28/19 ¡ 18 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Are trust issues THAT bad? » Yes, they are » Less likely to › Review the all results › Investigate or report failures › Actually find these issues

Desensitization

#Agile leDe DevOpsCon @pg pgri rizzaffi

Keep Up Your Strength

slide-21
SLIDE 21

5/28/19 ¡ 19 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Keep noise to a minimum › Only alert “usual suspects” › Reports non-abrasive but prominent › Better error/log messages » Fix it › Fix the tool › Fix the scripts › Fix the product » Only check what will be fixed

Keep Up Your Strength

#Agile leDe DevOpsCon @pg pgri rizzaffi

Stop Testing?!?!

slide-22
SLIDE 22

5/28/19 ¡ 20 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Fixing issues requires effort » Testing fixes requires effort » Business may not want a fix » This can lead to… › Constant or intermittent failures › Which leads to more triage effort › Which leads to more failure fatigue

Stop Testing?!?!

#Agile leDe DevOpsCon @pg pgri rizzaffi

A Little R&R

slide-23
SLIDE 23

5/28/19 ¡ 21 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Stop that script (that certainly stops the failure) » If it will be fixed eventually… › Change script to check for the incorrect behavior › Add script change activity to defect’s work item › And make it fail when correct behavior is restored

A Little R&R

#Agile leDe DevOpsCon @pg pgri rizzaffi

Confession

slide-24
SLIDE 24

5/28/19 ¡ 22 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» I sort of backed into this » I’m lazy (the good kind) » Needed a CI/CD-like environment » BAT file to run scripts every 30 minutes » Noticed it was good at finding Sasquatch

Confession

#Agile leDe DevOpsCon @pg pgri rizzaffi

About That Partnership

slide-25
SLIDE 25

5/28/19 ¡ 23 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Wanted a highly visible state of the product » Had home automation stuff laying around » “Red Light Suite” » “Why’s the red light’s on?” – A Tester » Time passes, Sasquatch eliminated » “Why’s the red light’s on?” – A Developer

About That Partnership

#Agile leDe DevOpsCon @pg pgri rizzaffi

HiVAT

slide-26
SLIDE 26

5/28/19 ¡ 24 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» High Volume Automated Testing » The actual inspiration » “…a family of testing techniques that enable the tester to create, run and evaluate the

results of arbitrarily many tests” *

» “…hunting hard-to-replicate bugs that involve timing…” ** » Dr. Cem Kaner *** » Inspiring area: exploit existing tests or tools

HiVAT

* http://context-driven-testing.com/?p=69 ** http://kaner.com/pdfs/StarHiVAT2013KanerOliverFioravantiFinal.pdf *** http://kaner.com/?p=278

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Tests focused on inputs, including › High-volume combination testing › Fuzzing » Tests that exploit the available oracles, including › Functional equivalence testing › Constraint checks » Tests that exploit existing tests or tools, including › Long-sequence regression testing › Load-enhanced functional testing

Areas of HiVAT *

* http://kaner.com/?p=278

slide-27
SLIDE 27

5/28/19 ¡ 25 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Outside Of Continuous Integration

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Also of note regarding HiVAT › Random › Human investigation of results » “Scud” » Two implementations › eComm – Randomly clicks web page links › Healthcare – Randomly clicks menu items » Reports on things that “don’t seem right” » Testers audit results » Does not lend itself to traditional “pass/fail”

Outside Of Continuous Integration

slide-28
SLIDE 28

5/28/19 ¡ 26 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

» Some issues are intermittent…they just are » Keep “run on deploy”, add periodic automation » You must trust your automation (the truth is out there) » Look at results – fail and pass » Beware failure fatigue

Takeaways

#Agile leDe DevOpsCon @pg pgri rizzaffi

slide-29
SLIDE 29

5/28/19 ¡ 27 ¡

#Agile leDe DevOpsCon @pg pgri rizzaffi

Questions!

http://www.linkedin.com/in/paulgrizzaffi @pgrizzaffi http://responsibleautomation.wordpress.com paulg@magenic.com