SlideShare una empresa de Scribd logo
1 de 10
Automation solution for web apps

Vadym Goncharenko, December 2013
Agenda:
•
•
•
•
•
•
•

1. Introduction in JBehave
2. Behavior driven development
3. Selenium as a tool for automation testing
4. How to create new test scenario
5. The page objects pattern
6. Good and bad practices
7. Running test scenarios through maven
Introduction in JBehave
• JBehave is a framework for Behaviour-Driven Development
Behavior driven development
• Behavior-driven development is a software development
process based on test-driven development (TDD)
Selenium
• Selenium is a suite of tools to automate web browsers across
many platforms.
• Selenium IDE is a complete integrated development
environment (IDE) for Selenium tests.
• Selenium Remote Control (RC) is a server, written in Java, that
accepts commands for the browser via HTTP.
• Selenium WebDriver is the successor to Selenium RC.
Create new test
• Write new test scenario on the Gherkin like:
Scenario: “describes what should be passed”
Given: “given something”
When: “something happened”
Then:
“should be something”

• Implementation for this scenario
@Given ("given something")
public void givenSomething() {
}
@When ("something happened")
public void whenSomethingHappened() {
}
@Then ("should be something")
public void thenShouldBeSomething() {
}
The page objects pattern
• More popular in test automation;
• Page object is an object-oriented;
• Serves as an interface to a page;
Web page

Java class

Enhancing test maintenance;
Reducing code duplication;

Test cases
Good and bad practices
public class GoogleLoginSteps {
private Selenium selenium;
public void googleLoginSteps() {
selenium.open("google.com");
selenium.waitForPageToLoad("10000");
selenium.click("id=gb_70");
selenium.type("id=Email", "wrong@gmail.com");
selenium.type("id=Passwd", "wrong password");
selenium.click("id=signIn");
selenium.waitForPageToLoad("10000");
assertTrue(selenium.isElementPresent("errormsg_0_Passwd"));
}
}
Running test scenarios through maven
Maven is a build automation tool used primarily for Java projects
Basic concepts, examples:
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<version>3.4</version>
</dependency>

<execution>
<id>unpack-view-resources</id>
<phase>process-resources</phase>
<goals>
<goal>unpack-view-resources</goal>
</goals>
</execution>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<compilerVersion>1.5</compilerVersion>
</configuration>
</plugin>

mvn clean install
Questions ?

Más contenido relacionado

La actualidad más candente

Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsSauce Labs
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerAndrew Siemer
 
2 selenium-aakar gupte
2 selenium-aakar gupte2 selenium-aakar gupte
2 selenium-aakar gupteaakar gupte
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Ed Blankenship
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Sauce Labs
 
Run Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test ManagerRun Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test ManagerDaniel Herken
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use casessatejsahu
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD123abcda
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascriptkhanhdang1214
 
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsBinary Studio
 
Auditing Drupal Sites
Auditing Drupal SitesAuditing Drupal Sites
Auditing Drupal SitesExove
 
Continuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgContinuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgSauce Labs
 
What's new in selenium 4
What's new in selenium 4What's new in selenium 4
What's new in selenium 4Knoldus Inc.
 
Test automation Frame Works
Test automation Frame WorksTest automation Frame Works
Test automation Frame WorksvodQA
 
Testing desktop apps with selenium
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with seleniumFilip Braun
 

La actualidad más candente (20)

Protractor
ProtractorProtractor
Protractor
 
Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms Organizations
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
 
2 selenium-aakar gupte
2 selenium-aakar gupte2 selenium-aakar gupte
2 selenium-aakar gupte
 
Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010Lap Around Visual Studio 2010 Ultimate And TFS 2010
Lap Around Visual Studio 2010 Ultimate And TFS 2010
 
Selenium
SeleniumSelenium
Selenium
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Run Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test ManagerRun Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test Manager
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
 
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applications
 
Auditing Drupal Sites
Auditing Drupal SitesAuditing Drupal Sites
Auditing Drupal Sites
 
Continuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgContinuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.org
 
What's new in selenium 4
What's new in selenium 4What's new in selenium 4
What's new in selenium 4
 
Qa process
Qa processQa process
Qa process
 
Test automation Frame Works
Test automation Frame WorksTest automation Frame Works
Test automation Frame Works
 
Testing desktop apps with selenium
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with selenium
 
test_automation_POC
test_automation_POCtest_automation_POC
test_automation_POC
 

Destacado

ASKEP Flu Burung & Babi
ASKEP Flu Burung & BabiASKEP Flu Burung & Babi
ASKEP Flu Burung & Babivjdova
 
Askep flu burung dan flu babi,,
Askep flu burung dan flu babi,,Askep flu burung dan flu babi,,
Askep flu burung dan flu babi,,vjdova
 
Natural Born Killers, Performance issues to avoid
Natural Born Killers, Performance issues to avoid Natural Born Killers, Performance issues to avoid
Natural Born Killers, Performance issues to avoid Richard Douglas
 
Askep Flu Burung & Babi
Askep Flu Burung & BabiAskep Flu Burung & Babi
Askep Flu Burung & Babivjdova
 

Destacado (6)

ASKEP Flu Burung & Babi
ASKEP Flu Burung & BabiASKEP Flu Burung & Babi
ASKEP Flu Burung & Babi
 
Askep flu burung dan flu babi,,
Askep flu burung dan flu babi,,Askep flu burung dan flu babi,,
Askep flu burung dan flu babi,,
 
Wakugadu amaruwa 01 11-2012
Wakugadu amaruwa 01 11-2012Wakugadu amaruwa 01 11-2012
Wakugadu amaruwa 01 11-2012
 
Natural Born Killers, Performance issues to avoid
Natural Born Killers, Performance issues to avoid Natural Born Killers, Performance issues to avoid
Natural Born Killers, Performance issues to avoid
 
Askep Flu Burung & Babi
Askep Flu Burung & BabiAskep Flu Burung & Babi
Askep Flu Burung & Babi
 
Jbehave selenium
Jbehave seleniumJbehave selenium
Jbehave selenium
 

Similar a Automation solution

Selenium – Web Browser Automation
Selenium – Web Browser AutomationSelenium – Web Browser Automation
Selenium – Web Browser AutomationPakorn Weecharungsan
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkOleksiy Rezchykov
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Simplilearn
 
Enhancing Website and Application Testing with Java Scrapers.pdf
Enhancing Website and Application Testing with Java Scrapers.pdfEnhancing Website and Application Testing with Java Scrapers.pdf
Enhancing Website and Application Testing with Java Scrapers.pdfAnanthReddy38
 
4.1 Selenium_Course_Content.ppt
4.1 Selenium_Course_Content.ppt4.1 Selenium_Course_Content.ppt
4.1 Selenium_Course_Content.pptUnknownGuy41
 
Selenium_Course_Contenttttttttttttttttt.ppt
Selenium_Course_Contenttttttttttttttttt.pptSelenium_Course_Contenttttttttttttttttt.ppt
Selenium_Course_Contenttttttttttttttttt.pptAshishKumar512860
 
Selenium-Course-Content.ppt
Selenium-Course-Content.pptSelenium-Course-Content.ppt
Selenium-Course-Content.pptMohammedSuhale
 
Introduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeopleIntroduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeopleSpringPeople
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試 政億 林
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousaEmma Armstrong
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch Haitham Refaat
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Controlusha kannappan
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using SeleniumNikhil Kapoor
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDERobert Greiner
 

Similar a Automation solution (20)

Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
 
11-01-2023.pptx
11-01-2023.pptx11-01-2023.pptx
11-01-2023.pptx
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Selenium
SeleniumSelenium
Selenium
 
Selenium – Web Browser Automation
Selenium – Web Browser AutomationSelenium – Web Browser Automation
Selenium – Web Browser Automation
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Enhancing Website and Application Testing with Java Scrapers.pdf
Enhancing Website and Application Testing with Java Scrapers.pdfEnhancing Website and Application Testing with Java Scrapers.pdf
Enhancing Website and Application Testing with Java Scrapers.pdf
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
4.1 Selenium_Course_Content.ppt
4.1 Selenium_Course_Content.ppt4.1 Selenium_Course_Content.ppt
4.1 Selenium_Course_Content.ppt
 
Selenium_Course_Contenttttttttttttttttt.ppt
Selenium_Course_Contenttttttttttttttttt.pptSelenium_Course_Contenttttttttttttttttt.ppt
Selenium_Course_Contenttttttttttttttttt.ppt
 
Selenium-Course-Content.ppt
Selenium-Course-Content.pptSelenium-Course-Content.ppt
Selenium-Course-Content.ppt
 
Introduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeopleIntroduction to Selenium Webdriver - SpringPeople
Introduction to Selenium Webdriver - SpringPeople
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousa
 
Selenium using C# by Yogesh Kumar
Selenium using C# by  Yogesh KumarSelenium using C# by  Yogesh Kumar
Selenium using C# by Yogesh Kumar
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDE
 

Último

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Automation solution

  • 1. Automation solution for web apps Vadym Goncharenko, December 2013
  • 2. Agenda: • • • • • • • 1. Introduction in JBehave 2. Behavior driven development 3. Selenium as a tool for automation testing 4. How to create new test scenario 5. The page objects pattern 6. Good and bad practices 7. Running test scenarios through maven
  • 3. Introduction in JBehave • JBehave is a framework for Behaviour-Driven Development
  • 4. Behavior driven development • Behavior-driven development is a software development process based on test-driven development (TDD)
  • 5. Selenium • Selenium is a suite of tools to automate web browsers across many platforms. • Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. • Selenium Remote Control (RC) is a server, written in Java, that accepts commands for the browser via HTTP. • Selenium WebDriver is the successor to Selenium RC.
  • 6. Create new test • Write new test scenario on the Gherkin like: Scenario: “describes what should be passed” Given: “given something” When: “something happened” Then: “should be something” • Implementation for this scenario @Given ("given something") public void givenSomething() { } @When ("something happened") public void whenSomethingHappened() { } @Then ("should be something") public void thenShouldBeSomething() { }
  • 7. The page objects pattern • More popular in test automation; • Page object is an object-oriented; • Serves as an interface to a page; Web page Java class Enhancing test maintenance; Reducing code duplication; Test cases
  • 8. Good and bad practices public class GoogleLoginSteps { private Selenium selenium; public void googleLoginSteps() { selenium.open("google.com"); selenium.waitForPageToLoad("10000"); selenium.click("id=gb_70"); selenium.type("id=Email", "wrong@gmail.com"); selenium.type("id=Passwd", "wrong password"); selenium.click("id=signIn"); selenium.waitForPageToLoad("10000"); assertTrue(selenium.isElementPresent("errormsg_0_Passwd")); } }
  • 9. Running test scenarios through maven Maven is a build automation tool used primarily for Java projects Basic concepts, examples: <dependency> <groupId>org.jbehave</groupId> <artifactId>jbehave-core</artifactId> <version>3.4</version> </dependency> <execution> <id>unpack-view-resources</id> <phase>process-resources</phase> <goals> <goal>unpack-view-resources</goal> </goals> </execution> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <compilerVersion>1.5</compilerVersion> </configuration> </plugin> mvn clean install