Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full...
Transcript of Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full...
Behavior Driven GUI Test Automationfor Java Desktop, Embedded & Mobile Applications
About meAmanda Burma
Background | Automated QA Test Engineering
Company | froglogic
Focus areas | Software quality tools & Cross-platform testing
Agenda
What is BDD? Why BDD and BDT? Automating a Behavior Driven GUI Test Integrating BDT and Test Automation
What is Behavior Driven Development (BDD)?What is Behavior Driven Testing (BDT)?
“BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.” - Dan North
http://en.wikipedia.org/wiki/Behavior-driven_development
OR...
What is Behavior Driven Development (BDD)?What is Behavior Driven Testing (BDT)?
Test frst development on a higher level Clear separation of test logic and implementation Features & tests - defned in a common human readable language- implemented in a common human readable language
Why BDD & BDT?
Describe (Test) in a human-readable DSL
Focus on application behavior
Clear logic vs. implementation separation
Enable non-engineer test creation
Why BDD?Clear Feature Requirements & Results
Production
RefactorCode
MakeFeature Test
Pass
Write a FailingFeature Test
Implement
Release Bug
Repeat
MakeFeature Test
Pass
MakeFeature Test
Pass
Production
RefactorCode
Given » When » Then
Feature: Create new address books
Scenario: Create a new blank address book
Given the app is running
When user creates a new address book
Then the address book is blank
Writing a Feature File
Write a FailingFeature Test
Implement
Release Bug
Repeat
Write a FailingFeature Test
Production
RefactorCode
Test Step Implementation
Given("the app is running", function(context) {
startApplication("AddressBookSwing.jar");
});
When("user creates a new address book", function(context) {
activateItem(waitForObjectItem(":AddressBook_javax.swing.JMenuBar", "File"));
activateItem(waitForObjectItem(":File_javax.swing.JMenu", "New..."));
});
Then("the address book is blank", function(context) {
waitFor("object.exists(':AddressBook_javax.swing.JTable')", 20000);
test.compare(findObject(":AddressBook_javax.swing.JTable").rowcount, 1);
});
Generate using Guided-Recording (optional)
MakeFeature Test
Pass
Implement
Release Bug
Repeat
MakeFeature Test
Pass
Write a FailingFeature Test
MakeFeature Test
Pass
Production
Test Step Implementation
Given("the app is running", function(context) {
startApplication("AddressBookSwing.jar");
});
When("user creates a new address book", function(context) {
common.invokeMenuItem("File","New");
});
Then("the address book is blank", function(context) {
common.verifyRowCount(":AddressBook_javax.swing.Jtable", 1);
});
Refactoring
Implement
Release Bug
Repeat
RefactorCode
MakeFeature Test
Pass
Production
BDD GUI Test Automation Demo
Complete support for Feature Files written in Gherkin- 100% compatible with Cucumber, Behave, etc.
Test steps can be implemented in any of Squish's supported scripting languages- Python, Perl, JavaScript, Tcl & Ruby
Full IDE support- Editor with code completion, recording of steps, etc.
Produce clearer test results- Color-coded results directly in Features fle
Built-in Behavior Driven Development & Testing Support
BDD in Squish
Platforms
Object-based GUI Test Automation
Technologies
Why Squish?
Contact [email protected]
amandaburma