QASource presented on reducing false positives in automated testing. Some key points:
1. False positives occur when tests are incorrectly marked as failed when they should have passed. Common causes include reliance on UI elements, synchronization issues, and unstable test code.
2. False positives can impact automation by wasting time investigating failures, decreasing productivity, and obscuring real bugs.
3. Strategies to reduce false positives include using stable locators, short independent tests, dynamic synchronization, teardown logic, and re-execution of failed tests.
4. Eliminating false positives leads to more certainty in test results and reduced costs of automation.
3. QASource Confidential
Question #1
How many years of experience do you have with Selenium?
< 2 years 2-4 years 5+ years
What is the size of your automation suite?
< 100
test cases
100-250
test cases
250-500
test cases
500+
test cases
What is the most important reason why you invest in automation?
Save Money
Save Time/
Release Faster
More QA
Coverage
Question #2
Question #3
Attendees poll
4. QASource Confidential
Anand Ramakrishnan
QA Director,
QASource
• 15+ years of automation experience
• Directing a team of 150 engineers
• M.S. in Computer Applications
• M.S. in Cyber Law & Security
5. QASource Confidential
Key learnings & takeaways
What are false positives and why do they occur
Common causes and the challenges
How to implement key strategies to reduce them
Case studies and real world examples
FREE step by step guide to creating CSS locators
6. QASource Confidential
What are false positives?
Tests that are marked as
failed, when in reality they
should have passed or should
functionally work.
8. QASource Confidential
Relying on UI
Relying on sequence of execution
Manual intervention
Slow performance
Reference data change
Shared environment
Change in UI element properties
Potential causes for false positives
9. QASource Confidential
Impacts on automation
Ignoring failures
Wasting time investigating
failures
Decrease in productivity
Frustration for engineering team
Risk of missing potential bug
Increasing cost of automation
Uncertainty of application health
16. QASource Confidential
Keys to reducing false positives
Keeping tests independent
TEST SCRIPT
1
TEST SCRIPT
2
TEST SCRIPT
3
TEST SCRIPT
4
Create User
Create Group
Add User to
Group
Search User
25. QASource Confidential
Keys to reducing false positives
Re-execution capability
RE-EXECUTION
LOGIC FLAG
TEST SUITE
TEST CASE 1
TEST CASE 2
—————
—————
—————
TEST CASE N
Pass
Failed
RE-EXECUTION OF
FAILED TESTS
Test case
name
Status Re-
executed
TEST CASE 1
PASS NO
TEST CASE 2 PASS
YES
TEST CASE 3 FAIL YES
_____ _____ _____
TEST CASE N PASS YES
EXECUTION
EXECUTION REPORT
26. QASource Confidential
Conclusion
Using right locators for
objects identification
Dynamic object
synchronization
Re-execution capability
Tear-down approach
Keeping tests short Keeping tests independent
Controlled environment for
automation
Deploy application on
optimal configuration
27. QASource Confidential
Benefits of eliminating false positives
Certainty of application health
Increase in productivity
Save time not investigating false
positives
Will not miss potential bugs
Decrease cost of automation
28. QASource Confidential
Get your FREE Step by Step
Guide to Create CSS
Locators
qasource.com/css-locatorsknowledgecenter@qasource.com