Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Now
BDD
Skilled testers
Some automation
A commercial tool Some contractors A project delivery approach Half a million dollars
An in house solution
A mix of open-source & commercial tools In-house R&D One automation engineer
BAU delivery
In house solution
QA team on board
In house solution
QA team on board
In house solution
QA team on board
Nunit
Resharper Selenium/Grid Team City Vmware
Behaviour Driven?
A specialized version of TDD Name of test methods should be sentences Readable when test fails A ubiquitous language for analysis Executable acceptance criteria
Tools
Java JBehave .Net SpecFlow Ruby Cucumber/RSpec
A BDD scenario:
Given the account is overdrawn And the card is valid When the customer requests cash Then ensure a rejection message is displayed And ensure cash is not dispensed And ensure the card is returned.
[Given(TheAccountIsOverdrawn)] Public void TheAccountIsOverdrawn (){ setupAccount(overdrawn);} [And(TheCardIsValid)] Public void TheCardIsValid (){ setupCard(valid);} [When(TheCustomerRequestsCash)] Public void TheCustomerRequestsCash (){ aCustomer.Setup(standard); customer.requestCash();}
Tool generates method stubs to help Testers focusing on what to test next.
Challenges
Unskilled testers
Test framework Unstable tests
Unskilled testers
Start training with motivated testers Set examples Learn by following, then creating Give enough time Always have helps available
Test framework
Use established patterns Leverage application code Make it earlier to understand Naming and conventions
Unstable tests
Decouple tests from build pipeline Categorize tests Leverage application code Wait and retry and verify
Catches
An additional layer = more code
More code = more maintenance Given/When/Then format can be too verbose
Tips
Categorize tests Stabilize tests Speed up tests Design testable architecture
Categorize tests
Warm up tests < 1 minute Smoke tests < 5 minutes Regression tests < 15 minutes Daily regression tests < 1 hour Unstable tests
Stabilize tests
Ensure atomicity Control the environment (system, application and data) Run tests in random order Wait, retry and verify
Speed up tests
Run tests in parallel [Selenium Grid] [SauceLabs] One code base, use application code where necessary Smaller tests
Most Importantly
Keep tests Green (its the heartbeat)
ray.hua@myob.com