SlideShare a Scribd company logo
Fluent Interfaces in Testing
@Test
public void testCheckResults() {

        startSeleniumSession("localhost", 8000, "firefox", "www.google.com");

        Selenium selenium = session();

        selenium.type("//input[@name="search"]", "vodQA infusion");

        selenium.click("//form[@id='search']/a/span[text()='Go']");

        selenium.waitForPageToLoad("300000");

        selenium.isElementPresent("//div[@class='resultStats']");

        verifyTrue(session().isTextPresent("the testing spirit"));
}
@Test
public void shouldReturnResultsForGivenQuery() {
        new HomePage()
        .enterSearchString("vodQA infusion").search()
        .validateResultsDisplayed()
        .validateSearchResult("the testing spirit");
}

http://code.google.com/p/selenium/wiki/PageObjects


                           @Test
                           public void testCheckResults() {
                                        startSeleniumSession("localhost", 8000, "firefox", "www.google.com");
                                        Selenium selenium = session(); selenium.type("//input[@name="search"]",
                                                     "vodQA infusion");
                                        selenium.click("//form[@id='search']/a/span[text()='Go']");
                                        selenium.waitForPageToLoad("300000");
                                        selenium.isElementPresent("//div[@class='resultStats']");
                                        verifyTrue(session().isTextPresent("the testing spirit"));
                           }
Fluent Interface?

@Test
public void shouldReturnResultsForGivenQuery() {
          new HomePage()
          .enterSearchString("vodQA infusion").search()
          .validateResultsDisplayed()
          .validateSearchResult("the testing spirit"); }
Confused?
A different example
import static org.openqa.selenium.lift.Finders.*;
import static org.openqa.selenium.lift.Matchers.*;
...
@Test
public void testHasAnImageSearchPage() {

        goTo("http://www.google.com");

        assertPresenceOf(link("Images"));

        assertPresenceOf(atLeast(4), links().with(text(not(equalTo("Images")))));

        clickOn(link("Images"));

        assertPresenceOf(title().with(text(equalTo("Google Image Search"))));
}

http://code.google.com/p/selenium/wiki/LiftStyleApi
https://lift.dev.java.net/
assertThat
Examples

assertThat(searchResultsCount, greaterThan(10));

assertThat(username, equalTo("Anay"));

assertThat(currentTimeText, startsWith("Local time:"));

assertThat(basket, new IsCollectionContaining<String>(equalTo("apples")));

assertThat(xml, hasXPath("/root/@type", equalTo("food")));
Matchers




http://code.google.com/p/hamcrest/wiki/Tutorial
Thank You

anayak@thoughtworks.com

More Related Content

What's hot

SCULPT! YOUR! TESTS!
SCULPT! YOUR! TESTS!SCULPT! YOUR! TESTS!
SCULPT! YOUR! TESTS!
Taras Oleksyn
 
Web Automation Testing Using Selenium
Web Automation Testing Using SeleniumWeb Automation Testing Using Selenium
Web Automation Testing Using Selenium
Pete Chen
 
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache IgniteNeues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
QAware GmbH
 
Яків Крамаренко “Локатори і з чим їх їдять:)”
Яків Крамаренко “Локатори і з чим їх їдять:)”Яків Крамаренко “Локатори і з чим їх їдять:)”
Яків Крамаренко “Локатори і з чим їх їдять:)”
Dakiry
 
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Alex Soto
 
Qualidade de vida: Com Zabbix e API
Qualidade de vida: Com Zabbix e APIQualidade de vida: Com Zabbix e API
Qualidade de vida: Com Zabbix e API
Luiz Sales
 
Python: the coolest is yet to come
Python: the coolest is yet to comePython: the coolest is yet to come
Python: the coolest is yet to come
Pablo Enfedaque
 
Protecting your data from SQL Injection attacks
Protecting your data from SQL Injection attacksProtecting your data from SQL Injection attacks
Protecting your data from SQL Injection attacks
Kevin Alcock
 
Xamarin で Cognitive Services を使ってみよう
Xamarin で Cognitive Services を使ってみようXamarin で Cognitive Services を使ってみよう
Xamarin で Cognitive Services を使ってみよう
Yoshito Tabuchi
 
Apache cheat sheet
Apache cheat sheetApache cheat sheet
Apache cheat sheet
Lam Hoang
 
Technical training sample
Technical training sampleTechnical training sample
Technical training sample
openerpwiki
 
ZendFramework2 & Symfony2
ZendFramework2 & Symfony2ZendFramework2 & Symfony2
ZendFramework2 & Symfony2
Wesley Victhor Mendes
 
A Quick Introduction to YQL
A Quick Introduction to YQLA Quick Introduction to YQL
A Quick Introduction to YQL
Max Manders
 
Scale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsScale 16x: Terraform all the Things
Scale 16x: Terraform all the Things
Nathan Handler
 

What's hot (14)

SCULPT! YOUR! TESTS!
SCULPT! YOUR! TESTS!SCULPT! YOUR! TESTS!
SCULPT! YOUR! TESTS!
 
Web Automation Testing Using Selenium
Web Automation Testing Using SeleniumWeb Automation Testing Using Selenium
Web Automation Testing Using Selenium
 
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache IgniteNeues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
Neues aus dem Tindergarten: Auswertung "privater" APIs mit Apache Ignite
 
Яків Крамаренко “Локатори і з чим їх їдять:)”
Яків Крамаренко “Локатори і з чим їх їдять:)”Яків Крамаренко “Локатори і з чим їх їдять:)”
Яків Крамаренко “Локатори і з чим їх їдять:)”
 
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
 
Qualidade de vida: Com Zabbix e API
Qualidade de vida: Com Zabbix e APIQualidade de vida: Com Zabbix e API
Qualidade de vida: Com Zabbix e API
 
Python: the coolest is yet to come
Python: the coolest is yet to comePython: the coolest is yet to come
Python: the coolest is yet to come
 
Protecting your data from SQL Injection attacks
Protecting your data from SQL Injection attacksProtecting your data from SQL Injection attacks
Protecting your data from SQL Injection attacks
 
Xamarin で Cognitive Services を使ってみよう
Xamarin で Cognitive Services を使ってみようXamarin で Cognitive Services を使ってみよう
Xamarin で Cognitive Services を使ってみよう
 
Apache cheat sheet
Apache cheat sheetApache cheat sheet
Apache cheat sheet
 
Technical training sample
Technical training sampleTechnical training sample
Technical training sample
 
ZendFramework2 & Symfony2
ZendFramework2 & Symfony2ZendFramework2 & Symfony2
ZendFramework2 & Symfony2
 
A Quick Introduction to YQL
A Quick Introduction to YQLA Quick Introduction to YQL
A Quick Introduction to YQL
 
Scale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsScale 16x: Terraform all the Things
Scale 16x: Terraform all the Things
 

Viewers also liked

Rugby
RugbyRugby
Power point 3 media
Power point 3 mediaPower point 3 media
Power point 3 mediajackthompson
 
Arabskie przebudzenie
Arabskie przebudzenieArabskie przebudzenie
Arabskie przebudzeniesknsz
 
Power point 5 media
Power point 5 mediaPower point 5 media
Power point 5 mediajackthompson
 
Inwestycje zagraniczne w chinach
Inwestycje zagraniczne w chinachInwestycje zagraniczne w chinach
Inwestycje zagraniczne w chinachsknsz
 
مشروع الجمعيات الأهلية في مجلس الشورى
مشروع الجمعيات الأهلية في مجلس الشورىمشروع الجمعيات الأهلية في مجلس الشورى
مشروع الجمعيات الأهلية في مجلس الشورى
nouf abdullaziz
 
Vysali - QC based framework
Vysali - QC based frameworkVysali - QC based framework
Vysali - QC based framework
vodQA
 
Linkedin for Lawyers
Linkedin for LawyersLinkedin for Lawyers
Linkedin for Lawyers
Ja-Nae Duane
 
BDT workshop - Anand Bagmar
BDT workshop - Anand BagmarBDT workshop - Anand Bagmar
BDT workshop - Anand Bagmar
vodQA
 
Czy opłaciło się nam wejść do unii europejskiej
Czy opłaciło się nam wejść do unii europejskiejCzy opłaciło się nam wejść do unii europejskiej
Czy opłaciło się nam wejść do unii europejskiejsknsz
 
Weather
WeatherWeather
Weathersueque
 
Pr1 ri
Pr1 riPr1 ri
Pr1 ri
Anam
 
Chiba pm#1 - ArangoDB for Perl
Chiba pm#1 - ArangoDB for PerlChiba pm#1 - ArangoDB for Perl
Chiba pm#1 - ArangoDB for PerlHideaki Ohno
 
Diseños experimentales optometría
Diseños experimentales  optometríaDiseños experimentales  optometría
Diseños experimentales optometría
Universidad Técnica de Manabí
 
VodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillara
VodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillaraVodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillara
VodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillara
vodQA
 
Power point 1 media
Power point 1 mediaPower point 1 media
Power point 1 media
jackthompson
 

Viewers also liked (20)

Rugby
RugbyRugby
Rugby
 
Book cristian araya
Book cristian arayaBook cristian araya
Book cristian araya
 
Power point 3 media
Power point 3 mediaPower point 3 media
Power point 3 media
 
Arabskie przebudzenie
Arabskie przebudzenieArabskie przebudzenie
Arabskie przebudzenie
 
Power point 5 media
Power point 5 mediaPower point 5 media
Power point 5 media
 
Inwestycje zagraniczne w chinach
Inwestycje zagraniczne w chinachInwestycje zagraniczne w chinach
Inwestycje zagraniczne w chinach
 
مشروع الجمعيات الأهلية في مجلس الشورى
مشروع الجمعيات الأهلية في مجلس الشورىمشروع الجمعيات الأهلية في مجلس الشورى
مشروع الجمعيات الأهلية في مجلس الشورى
 
Vysali - QC based framework
Vysali - QC based frameworkVysali - QC based framework
Vysali - QC based framework
 
Linkedin for Lawyers
Linkedin for LawyersLinkedin for Lawyers
Linkedin for Lawyers
 
BDT workshop - Anand Bagmar
BDT workshop - Anand BagmarBDT workshop - Anand Bagmar
BDT workshop - Anand Bagmar
 
DOCTYPE HTML PUBLIC
DOCTYPE HTML PUBLICDOCTYPE HTML PUBLIC
DOCTYPE HTML PUBLIC
 
MyPes
MyPesMyPes
MyPes
 
Czy opłaciło się nam wejść do unii europejskiej
Czy opłaciło się nam wejść do unii europejskiejCzy opłaciło się nam wejść do unii europejskiej
Czy opłaciło się nam wejść do unii europejskiej
 
Weather
WeatherWeather
Weather
 
Pr1 ri
Pr1 riPr1 ri
Pr1 ri
 
Chiba pm#1 - ArangoDB for Perl
Chiba pm#1 - ArangoDB for PerlChiba pm#1 - ArangoDB for Perl
Chiba pm#1 - ArangoDB for Perl
 
Diseños experimentales optometría
Diseños experimentales  optometríaDiseños experimentales  optometría
Diseños experimentales optometría
 
VodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillara
VodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillaraVodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillara
VodQA-TooMuchVerificationNotEnoughValidation_SrinivasChillara
 
Power point 1 media
Power point 1 mediaPower point 1 media
Power point 1 media
 
Workshop pdf
Workshop pdfWorkshop pdf
Workshop pdf
 

Similar to Anay - Fluent interfaces in testing

WebDriver Waits
WebDriver WaitsWebDriver Waits
WebDriver Waits
Yaroslav Pernerovsky
 
Testing Java Code Effectively - BaselOne17
Testing Java Code Effectively - BaselOne17Testing Java Code Effectively - BaselOne17
Testing Java Code Effectively - BaselOne17
Andres Almiray
 
Join the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsJoin the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.js
Seth McLaughlin
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 Grid
Daniel Herken
 
Test automation
Test  automationTest  automation
Test automation
Kaushik Banerjee
 
Testdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinnerTestdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinnerTruls Jørgensen
 
Unit testing CourseSites Apache Filter
Unit testing CourseSites Apache FilterUnit testing CourseSites Apache Filter
Unit testing CourseSites Apache Filter
Wayan Wira
 
Тройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOSТройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOS
Andrei Solntsev
 
Introduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic MigrationsIntroduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic Migrations
Jason Myers
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
Johannes Brodwall
 
UA testing with Selenium and PHPUnit - PHPBenelux Summer BBQ
UA testing with Selenium and PHPUnit - PHPBenelux Summer BBQUA testing with Selenium and PHPUnit - PHPBenelux Summer BBQ
UA testing with Selenium and PHPUnit - PHPBenelux Summer BBQ
Michelangelo van Dam
 
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
Tobias Schneck
 
WuKong - Framework for Integrated Test
WuKong - Framework for Integrated TestWuKong - Framework for Integrated Test
WuKong - Framework for Integrated TestSummer Lu
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Matt Raible
 
FluentLeniumで困った話
FluentLeniumで困った話FluentLeniumで困った話
FluentLeniumで困った話
Yuuki Ooguro
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Matt Raible
 
Escape from the automation hell
Escape from the automation hellEscape from the automation hell
Escape from the automation hell
Nikita Simonovets
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
jaxconf
 
Intro to testing Javascript with jasmine
Intro to testing Javascript with jasmineIntro to testing Javascript with jasmine
Intro to testing Javascript with jasmine
Timothy Oxley
 

Similar to Anay - Fluent interfaces in testing (20)

WebDriver Waits
WebDriver WaitsWebDriver Waits
WebDriver Waits
 
Testing Java Code Effectively - BaselOne17
Testing Java Code Effectively - BaselOne17Testing Java Code Effectively - BaselOne17
Testing Java Code Effectively - BaselOne17
 
Jena framework
Jena frameworkJena framework
Jena framework
 
Join the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsJoin the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.js
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 Grid
 
Test automation
Test  automationTest  automation
Test automation
 
Testdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinnerTestdrevet javautvikling på objektorienterte skinner
Testdrevet javautvikling på objektorienterte skinner
 
Unit testing CourseSites Apache Filter
Unit testing CourseSites Apache FilterUnit testing CourseSites Apache Filter
Unit testing CourseSites Apache Filter
 
Тройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOSТройничок: Selenide для Web, Android и iOS
Тройничок: Selenide для Web, Android и iOS
 
Introduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic MigrationsIntroduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic Migrations
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
UA testing with Selenium and PHPUnit - PHPBenelux Summer BBQ
UA testing with Selenium and PHPUnit - PHPBenelux Summer BBQUA testing with Selenium and PHPUnit - PHPBenelux Summer BBQ
UA testing with Selenium and PHPUnit - PHPBenelux Summer BBQ
 
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
 
WuKong - Framework for Integrated Test
WuKong - Framework for Integrated TestWuKong - Framework for Integrated Test
WuKong - Framework for Integrated Test
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
 
FluentLeniumで困った話
FluentLeniumで困った話FluentLeniumで困った話
FluentLeniumで困った話
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
 
Escape from the automation hell
Escape from the automation hellEscape from the automation hell
Escape from the automation hell
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
 
Intro to testing Javascript with jasmine
Intro to testing Javascript with jasmineIntro to testing Javascript with jasmine
Intro to testing Javascript with jasmine
 

More from vodQA

Performance Testing
Performance TestingPerformance Testing
Performance Testing
vodQA
 
Testing Strategy in Micro Frontend architecture
Testing Strategy in Micro Frontend architectureTesting Strategy in Micro Frontend architecture
Testing Strategy in Micro Frontend architecture
vodQA
 
Api testing libraries using java script an overview
Api testing libraries using java script   an overviewApi testing libraries using java script   an overview
Api testing libraries using java script an overview
vodQA
 
Testing face authentication on mobile
Testing face authentication on mobileTesting face authentication on mobile
Testing face authentication on mobile
vodQA
 
Testing cna
Testing cnaTesting cna
Testing cna
vodQA
 
Etl engine testing with scala
Etl engine testing with scalaEtl engine testing with scala
Etl engine testing with scala
vodQA
 
EDA for QAs
EDA for QAsEDA for QAs
EDA for QAs
vodQA
 
vodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
vodQA
 
vodQA Pune (2019) - Augmented reality overview and testing challenges
vodQA Pune (2019) - Augmented reality overview and testing challengesvodQA Pune (2019) - Augmented reality overview and testing challenges
vodQA Pune (2019) - Augmented reality overview and testing challenges
vodQA
 
vodQA Pune (2019) - Testing AI,ML applications
vodQA Pune (2019) - Testing AI,ML applicationsvodQA Pune (2019) - Testing AI,ML applications
vodQA Pune (2019) - Testing AI,ML applications
vodQA
 
vodQA Pune (2019) - Design patterns in test automation
vodQA Pune (2019) - Design patterns in test automationvodQA Pune (2019) - Design patterns in test automation
vodQA Pune (2019) - Design patterns in test automation
vodQA
 
vodQA Pune (2019) - Testing ethereum smart contracts
vodQA Pune (2019) - Testing ethereum smart contractsvodQA Pune (2019) - Testing ethereum smart contracts
vodQA Pune (2019) - Testing ethereum smart contracts
vodQA
 
vodQA Pune (2019) - Insights into big data testing
vodQA Pune (2019) - Insights into big data testingvodQA Pune (2019) - Insights into big data testing
vodQA Pune (2019) - Insights into big data testing
vodQA
 
vodQA Pune (2019) - Performance testing cloud deployments
vodQA Pune (2019) - Performance testing cloud deploymentsvodQA Pune (2019) - Performance testing cloud deployments
vodQA Pune (2019) - Performance testing cloud deployments
vodQA
 
vodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As codevodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As code
vodQA
 
vodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pactvodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA
 
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA
 
vodQA(Pune) 2018 - Enhancing the capabilities of testing team preparing for...
vodQA(Pune) 2018 - Enhancing the capabilities of testing team   preparing for...vodQA(Pune) 2018 - Enhancing the capabilities of testing team   preparing for...
vodQA(Pune) 2018 - Enhancing the capabilities of testing team preparing for...
vodQA
 
vodQA(Pune) 2018 - QAing the security way
vodQA(Pune) 2018 - QAing the security wayvodQA(Pune) 2018 - QAing the security way
vodQA(Pune) 2018 - QAing the security way
vodQA
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
vodQA
 

More from vodQA (20)

Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Testing Strategy in Micro Frontend architecture
Testing Strategy in Micro Frontend architectureTesting Strategy in Micro Frontend architecture
Testing Strategy in Micro Frontend architecture
 
Api testing libraries using java script an overview
Api testing libraries using java script   an overviewApi testing libraries using java script   an overview
Api testing libraries using java script an overview
 
Testing face authentication on mobile
Testing face authentication on mobileTesting face authentication on mobile
Testing face authentication on mobile
 
Testing cna
Testing cnaTesting cna
Testing cna
 
Etl engine testing with scala
Etl engine testing with scalaEtl engine testing with scala
Etl engine testing with scala
 
EDA for QAs
EDA for QAsEDA for QAs
EDA for QAs
 
vodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
 
vodQA Pune (2019) - Augmented reality overview and testing challenges
vodQA Pune (2019) - Augmented reality overview and testing challengesvodQA Pune (2019) - Augmented reality overview and testing challenges
vodQA Pune (2019) - Augmented reality overview and testing challenges
 
vodQA Pune (2019) - Testing AI,ML applications
vodQA Pune (2019) - Testing AI,ML applicationsvodQA Pune (2019) - Testing AI,ML applications
vodQA Pune (2019) - Testing AI,ML applications
 
vodQA Pune (2019) - Design patterns in test automation
vodQA Pune (2019) - Design patterns in test automationvodQA Pune (2019) - Design patterns in test automation
vodQA Pune (2019) - Design patterns in test automation
 
vodQA Pune (2019) - Testing ethereum smart contracts
vodQA Pune (2019) - Testing ethereum smart contractsvodQA Pune (2019) - Testing ethereum smart contracts
vodQA Pune (2019) - Testing ethereum smart contracts
 
vodQA Pune (2019) - Insights into big data testing
vodQA Pune (2019) - Insights into big data testingvodQA Pune (2019) - Insights into big data testing
vodQA Pune (2019) - Insights into big data testing
 
vodQA Pune (2019) - Performance testing cloud deployments
vodQA Pune (2019) - Performance testing cloud deploymentsvodQA Pune (2019) - Performance testing cloud deployments
vodQA Pune (2019) - Performance testing cloud deployments
 
vodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As codevodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As code
 
vodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pactvodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Consumer driven contract testing using pact
 
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...vodQA(Pune) 2018 - Visual testing of web apps in headless environment   manis...
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
 
vodQA(Pune) 2018 - Enhancing the capabilities of testing team preparing for...
vodQA(Pune) 2018 - Enhancing the capabilities of testing team   preparing for...vodQA(Pune) 2018 - Enhancing the capabilities of testing team   preparing for...
vodQA(Pune) 2018 - Enhancing the capabilities of testing team preparing for...
 
vodQA(Pune) 2018 - QAing the security way
vodQA(Pune) 2018 - QAing the security wayvodQA(Pune) 2018 - QAing the security way
vodQA(Pune) 2018 - QAing the security way
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

Anay - Fluent interfaces in testing

  • 2. @Test public void testCheckResults() { startSeleniumSession("localhost", 8000, "firefox", "www.google.com"); Selenium selenium = session(); selenium.type("//input[@name="search"]", "vodQA infusion"); selenium.click("//form[@id='search']/a/span[text()='Go']"); selenium.waitForPageToLoad("300000"); selenium.isElementPresent("//div[@class='resultStats']"); verifyTrue(session().isTextPresent("the testing spirit")); }
  • 3. @Test public void shouldReturnResultsForGivenQuery() { new HomePage() .enterSearchString("vodQA infusion").search() .validateResultsDisplayed() .validateSearchResult("the testing spirit"); } http://code.google.com/p/selenium/wiki/PageObjects @Test public void testCheckResults() { startSeleniumSession("localhost", 8000, "firefox", "www.google.com"); Selenium selenium = session(); selenium.type("//input[@name="search"]", "vodQA infusion"); selenium.click("//form[@id='search']/a/span[text()='Go']"); selenium.waitForPageToLoad("300000"); selenium.isElementPresent("//div[@class='resultStats']"); verifyTrue(session().isTextPresent("the testing spirit")); }
  • 4.
  • 5. Fluent Interface? @Test public void shouldReturnResultsForGivenQuery() { new HomePage() .enterSearchString("vodQA infusion").search() .validateResultsDisplayed() .validateSearchResult("the testing spirit"); }
  • 6.
  • 8. A different example import static org.openqa.selenium.lift.Finders.*; import static org.openqa.selenium.lift.Matchers.*; ... @Test public void testHasAnImageSearchPage() { goTo("http://www.google.com"); assertPresenceOf(link("Images")); assertPresenceOf(atLeast(4), links().with(text(not(equalTo("Images"))))); clickOn(link("Images")); assertPresenceOf(title().with(text(equalTo("Google Image Search")))); } http://code.google.com/p/selenium/wiki/LiftStyleApi https://lift.dev.java.net/
  • 10. Examples assertThat(searchResultsCount, greaterThan(10)); assertThat(username, equalTo("Anay")); assertThat(currentTimeText, startsWith("Local time:")); assertThat(basket, new IsCollectionContaining<String>(equalTo("apples"))); assertThat(xml, hasXPath("/root/@type", equalTo("food")));