This is a little presentation to make absolutely clear why test automation and test driven development are key to any software development process that strives for high quality and high productivity.
2. Typical Segregated Process
Development-Testing
At least 1 month
Development Testing Development Testing
Bug Bug Bug Bug
introduced detected fixed verified
Agile?
3. “Pull” Process
Vision
Operations Stakeholders,
Engineer Customers & Users
Value
Code Features
Software Business
Engineer Analyst
Scenarios
and User
Acceptance Stories
Criterias
Quality
Engineer
4. But how?
• Skills
– User Stories writing and Scenarios language
– Scenarios automation
– Software development
• Practices
– AATDD – Automated Acceptance Test Driven-Development
– BDD & TDD – Behaviour & Test Driven-Development
• Tools
– RFT
– Selenium
– Watir
– Jemmy
– Cucumber
– Twist
– Junit
– Java
– Ruby
– ...
5. Test all the ... time?
Old-school Agile
Writing Writing
Automation Automation
Execution Execution
Analysis Analysis
Where does the quality engineer
spend his/her time?
6. Goal: eliminate all manual
testing execution
Manual testing is a very expensive tax
paid at each software development cycle
7. Traditional x Agile Testing
Traditional Agile
• Manual • Automated
• Demotivating • Fun
• Slow • Fast
• Flawed • Sistematic
• Low competency • High competency
• Low value • High value
• Reactive • Proactive
• Defensive • Guiding
• Segregated • Integrated
8. The next level
Intrinsic Quality
(Automated)
Developer
Test Automation
Test Engineer
Scenario Language
Business Analyst
Quality by
Inspection
(Manual)
9. 5 reasons to love agile testing
1. There’s always time for testing, because
testing is done first
2. No more manual testing
3. Test results appear several times a day
4. There is a true “team” environment
5. The tester can fix bugs too
10. User stories and
Scenario Language
http://dannorth.net/whats-in-a-story
12. User Stories
• In order to ... VALUE
• As a ... ROLE
• I want to ... FEATURE
13. User Stories
• In order to best decide what to do in an
emergency situation
• As a resources manager
• I want to know which resources of a
determined type are available for use
15. Scenario Language
• Given ... CONTEXT / PRE-CONDITIONS
– And ...
• When ... EVENT / INPUT
– And ...
• Then ... EXPECTATION / OUTPUT
– And ...
16. Scenario Language
• Given I am monitoring an on-going emergency
situation at the factory
• When I enter the Query page
– And I click on “Resources” in the navigation tree
– And search for “Booms”
• Then I should see a list of records of type “Booms”
– And I should see the available quantity for each record
– And I should see the distance of each record from its
location to the factory
– And I should see the expiration date for each record
– And I should see a link “Request” for each record
17. Scenario Automation
• Given I am monitoring an on-going emergency Executable
situation at the factory Code
• When I enter the Query page Executable
– And I click on “Resources” in the navigation tree Code
– And search for “Booms”
• Then I should see a list of records of type “Booms”
– And I should see the available quantity for each record
– And I should see the distance of each record from its Executable
location to the factory Code
– And I should see the expiration date for each record
– And I should see a link “Request” for each record
19. Scenario Automation
with Cucumber
When /I click on “(.*)” in the navigation tree/ do |type|
tree = browser.current_page.navigation_tree
tree.click(type)
end
Then /I should see a list of records of type “(.*)”/ do |type|
page = browser.current_page
assert_true(page.contains_text?(“Query Results”))
assert_true(page.contains_text?(“ found”))
assert_true(page.contains_text?(type))
end
20. Scenario Automation
with Cucumber-Java
public class TreeSteps {
@When(“I click on “(.*)” in the navigation tree”)
public void clickOnType(String type) {
NavTree tree = new NavTree(browser().getCurrentPage())
tree.click(type)
}
}
21. THE END
Remember this:
“Manual regression testing is a completely
unfeasible and unacceptable practice.”
”Use automated acceptance tests to guide
your software product development.”