reducing false positives in automated testing

31
Reducing False Positives in Automated Testing

Upload: qasource

Post on 06-Aug-2015

72 views

Category:

Software


4 download

TRANSCRIPT

Page 1: Reducing False Positives In Automated Testing

Reducing False Positives

inAutomated

Testing

Page 2: Reducing False Positives In Automated Testing

FALSE POSITIVES ARE “FAILED”TESTS THAT SHOULD HAVE PASSED,

aka FALSE ALARMS.

Page 3: Reducing False Positives In Automated Testing

WHY DO THEY OCCUR?

Page 4: Reducing False Positives In Automated Testing

WHY DO THEY OCCUR?

• AUTOMATION APPROACH

Page 5: Reducing False Positives In Automated Testing

WHY DO THEY OCCUR?

• AUTOMATION APPROACH• IMPLEMENTED FRAMEWORK

Page 6: Reducing False Positives In Automated Testing

WHY DO THEY OCCUR?

• AUTOMATION APPROACH• IMPLEMENTED FRAMEWORK• THE WRITTEN TEST ITSELF

Page 7: Reducing False Positives In Automated Testing

THERE ARE SEVERAL POTENTIALCAUSES FOR FALSE POSITIVES IN

AUTOMATED TESTING:

Page 8: Reducing False Positives In Automated Testing

RELYING ON UI

Cause #1:

Page 9: Reducing False Positives In Automated Testing

Small changes in UI can causetest breakage

Page 10: Reducing False Positives In Automated Testing

CHANGE INUI ELEMENTPROPERTIES

Cause #2:

Page 11: Reducing False Positives In Automated Testing

Any change to:

ID

Page 12: Reducing False Positives In Automated Testing

Any change to:

IDCSS

Page 13: Reducing False Positives In Automated Testing

Any change to:

IDCSS

CLASS NAME

Page 14: Reducing False Positives In Automated Testing

Can result intest breakage

Page 15: Reducing False Positives In Automated Testing

SHAREDENVIRONMENTS

Cause #3:

Page 16: Reducing False Positives In Automated Testing

Functional & automated testing

require separate environments

Page 17: Reducing False Positives In Automated Testing

REFERENCEDATA CHANGE

Cause #4:

Page 18: Reducing False Positives In Automated Testing

Scripts may changeconfiguration data

required by a test

Page 19: Reducing False Positives In Automated Testing

SLOWPERFORMANCE

Cause #5:

Page 20: Reducing False Positives In Automated Testing

Slow performance =Slow test execution

& test failure

Page 21: Reducing False Positives In Automated Testing

MANUALINTERVENTION

Cause #6:

Page 22: Reducing False Positives In Automated Testing

Some data must be cleared manually

before/aftertest execution

Page 23: Reducing False Positives In Automated Testing

RELYING ONSEQUENCE OF

EXECUTION

Cause #7:

Page 24: Reducing False Positives In Automated Testing

Any failure intest sequenceimpacts the entire

test suite

Page 25: Reducing False Positives In Automated Testing

KEYS TOREDUCING

FALSE POSITIVES

Page 26: Reducing False Positives In Automated Testing

USE OPTIMAL CONFIGURATIONS

Page 27: Reducing False Positives In Automated Testing

USE OPTIMAL CONFIGURATIONS

CONTROLLED AUTOMATION ENVIRONMENT

Page 28: Reducing False Positives In Automated Testing

USE OPTIMAL CONFIGURATIONS

CONTROLLED AUTOMATION ENVIRONMENT

KEEP TESTS SHORT

Page 29: Reducing False Positives In Automated Testing

USE OPTIMAL CONFIGURATIONS

CONTROLLED AUTOMATION ENVIRONMENT

KEEP TESTS SHORT

KEEP TESTS INDEPENDENT

Page 30: Reducing False Positives In Automated Testing

USE OPTIMAL CONFIGURATIONS

CONTROLLED AUTOMATION ENVIRONMENT

KEEP TESTS SHORT

KEEP TESTS INDEPENDENT

USE RIGHT LOCATORSFOR OBJECT IDENTIFICATION