behavior driven gui test automation · 2017-12-06 · - python, perl, javascript, tcl & ruby...
TRANSCRIPT
![Page 1: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/1.jpg)
Behavior Driven GUI Test Automationfor Java Desktop, Embedded & Mobile Applications
![Page 2: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/2.jpg)
About meAmanda Burma
Background | Automated QA Test Engineering
Company | froglogic
Focus areas | Software quality tools & Cross-platform testing
![Page 3: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/3.jpg)
Agenda
What is BDD? Why BDD and BDT? Automating a Behavior Driven GUI Test Integrating BDT and Test Automation
![Page 4: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/4.jpg)
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...
![Page 5: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/5.jpg)
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
![Page 6: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/6.jpg)
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
![Page 7: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/7.jpg)
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
![Page 8: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/8.jpg)
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
![Page 9: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/9.jpg)
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
![Page 10: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/10.jpg)
BDD GUI Test Automation Demo
![Page 11: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/11.jpg)
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
![Page 12: Behavior Driven GUI Test Automation · 2017-12-06 · - Python, Perl, JavaScript, Tcl & Ruby Full IDE support - Editor with code completion, recording of steps, etc. Produce clearer](https://reader035.vdocuments.us/reader035/viewer/2022070800/5f0218ab7e708231d4028d4a/html5/thumbnails/12.jpg)
Platforms
Object-based GUI Test Automation
Technologies
Why Squish?