SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Fernando Sandes




How to
improve our
acceptance tests !
What is
     better?




Pyccuracy
         vs
How to improve our acceptance tests - Pyccuracy VS Splinter
It`s not (only)
   about
the technology
It`s an
ideologica
  difference
@gabrielfalcao
           Lettuce`s creator




The problem is that differently of
cucumber and lettuce, pyccuracy is
aimed to web testing, with pre-defined
"step definitions" (pyccuracy uses a
different nomenclature), and when I was
using it I found extremely hard to
maintain the tests as the test suite
grows, it's a hell!




                               lettuce
@gabrielfalcao
            Lettuce`s creator




“So I wrote lettuce to make it super flexible
so that I could write my own definitions in a super
easy way, and never couple my tests to robotic
step definitions.”



                                lettuce
Pyccuracy


    ROBOTIC
    STEP
  DEFINITIONS
ROBOTIC                              STEP        DEFINITIONS

Given I fill the field "#username" with "test"

And I fill the field "#password" with "1234"

When I click on the button 'input[type="submit"]'

Then I see the page contains the text "Hello Test User!"




                                                 Given I am at the login page

                                                 And I fill in the login information with "test" and password "1234"

                                                 When I click on the login button

                                                 Then I see I'm logged in as a normal user
ROBOTIC                              STEP        DEFINITIONS

Given I fill the field "#username" with "test"

And I fill the field "#password" with "1234"

When I click on the button 'input[type="submit"]'

Then I see the page contains the text "Hello Test User!"

                                                                        “You can see how your
                                                                        business it better defined here”



                                                 Given I am at the login page

                                                 And I fill in the login information with "test" and password "1234"

                                                 When I click on the login button

                                                 Then I see I'm logged in as a normal user
DONT`T BE
                           THE
                                           BOILING
                                           FROG               !
The presence of step definitions leads people down a very
bad path.
While it gives people a head start in writing scenarios it
also tricks people into writing scenarios are extremely
verbose and fragile.
People don't always realize this, so they continue cranking
out lots of crap scenarios based on pre-steps. This is like
the boiling frog story
IT`S ABOUT                      THE      DOMAIN !


 The “domain” is defined by the value
                             the stakeholders
 and users hope to achieve with the software.
 This can be booking a ticket or sharing pictures with friends or
 an infinite number of activities.


 Clicking links and buttons or filling in text fields has nothing
 (directly) to do with the domain.
Pyccuracy
IS BUROCRATIC !
a little more…
Imperative
         VS
           Declarative

            Scenarios in User Stories
The imperative style uses highly reusable

Imperative                                 granular steps which outlines
                                           user interface.
                                                                           much of the


                                           This binds the scenario to that interface.




Scenario: Successful login

Given a user "Aslak" with password "xyz"
And I am on the login page
And I fill in "User name" with "Aslak"
And I fill in "Password" with "xyz"
When I press "Log in"
Then I should see "Welcome, Aslak“
The imperative style uses highly reusable

Imperative                                 granular steps which outlines
                                           user interface.
                                                                            much of the


                                           This binds the scenario to that interface.




Scenario: Successful login                  Scenario: User is greeted upon login

Given a user "Aslak" with password "xyz"    Given the user "Aslak" has an account
And I am on the login page                  When he logs in
And I fill in "User name" with "Aslak"      Then he should see "Welcome, Aslak"
And I fill in "Password" with "xyz"
When I press "Log in"
Then I should see "Welcome, Aslak“




                                           Declarative
The imperative style uses highly reusable

Imperative                                 granular steps which outlines
                                           user interface.
                                                                            much of the


                                           This binds the scenario to that interface.




Scenario: Successful login                  Scenario: User is greeted upon login

Given a user "Aslak" with password "xyz"    Given the user "Aslak" has an account
And I am on the login page                  When he logs in
And I fill in "User name" with "Aslak"      Then he should see "Welcome, Aslak"
And I fill in "Password" with "xyz"
When I press "Log in"
Then I should see "Welcome, Aslak“




                                           Declarative
Imperative Declarative


When we’re describing other parts of the system that
require login, the login details like user name, password
and how to log in are only distracting. That is why
we make it a one-liner.
Imperative Declarative
Imperative Declarative
COMMUNICATION
                      IS THE
                                 GOAL!

  To use a BDD tool "right", one has to understand
  that the main goal is primarily about
  communication and secondarily
  about testing.
COMING BACK…


         And   about
         technology
SPLINTER
Splinter was not created to be another acceptance
tool, but an abstract   layer over other
tools,  its goal is provide a unique API that make
acceptance testing easier and funnier :)
SPLINTER

A LOT OF OPTIONS !
HEADLESS   OR NOT HEADLESS ?
HEADLESS



FAST

CHEAP

HARD TO DEBUG

IT`S NOT A BROWSER!
NOT HEADLESS



SLOW

EASY TO DEBUG

USE THE BROWSER
HEADLESS

NOT HEADLESS
 SPLINTER
SERVER




LOCAL
SERVER




        HEADLESS
LOCAL
NOT HEADLESS
                   SERVER




               HEADLESS
    LOCAL
SPLINTER
 and more…

http status code
multi webdrivers
css ,xpath, tag, name selectors
support to iframe and alert
execute javascript
work's with ajax and async javascript
SPLINTER
Browser

• visit(‘url’)
• reload()
• quit()
• html
• url
• title
SPLINTER
Searching elements


• find_by_css(‘.classe’)
• find_by_id(‘meuid’)
• find_by_xpath(‘//body’)
• find_by_tag(‘a’)
• find_by_name(‘search’)
SPLINTER
 Forms


• fill(‘name’, ‘value’)
• attach_file(‘name’, ‘/path/to/file.txt’)
• check(‘name’) #checkbox
• choose(‘name’, ‘value’) #radio button
• select(‘name’, ‘option’)
MORE


TESTS
SIKULI
         http://sikuli.org/index.shtml
NEEDLE
                   http://needle.readthedocs.org


                #AUTOMATED TESTS FOR CSS


  from needle.cases import NeedleTestCase


  class GoogleTest(NeedleTestCase):
    def test_footer(self):
      self.driver.get('http://www.google.com')
      e = self.driver.find_element_by_id('fctr')
      self.assertScreenshot(e, 'google-footer')
      self.assertEqual(e.get_computed_property('font-size'), '13px')

Mais conteúdo relacionado

Destaque

End to End Testing: Bug Squashing for API Developers
End to End Testing: Bug Squashing for API Developers End to End Testing: Bug Squashing for API Developers
End to End Testing: Bug Squashing for API Developers Apigee | Google Cloud
 
Rails testing: factories or fixtures?
Rails testing: factories or fixtures?Rails testing: factories or fixtures?
Rails testing: factories or fixtures?mtoppa
 
Automated testing with RSpec
Automated testing with RSpecAutomated testing with RSpec
Automated testing with RSpecNascenia IT
 
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...Apigee | Google Cloud
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumberDaniel Kummer
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testingdversaci
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentLiz Keogh
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 

Destaque (10)

[RuPy 2011] Automatic Acceptance Tests in Ruby
[RuPy 2011] Automatic Acceptance Tests in Ruby[RuPy 2011] Automatic Acceptance Tests in Ruby
[RuPy 2011] Automatic Acceptance Tests in Ruby
 
End to End Testing: Bug Squashing for API Developers
End to End Testing: Bug Squashing for API Developers End to End Testing: Bug Squashing for API Developers
End to End Testing: Bug Squashing for API Developers
 
Rails testing: factories or fixtures?
Rails testing: factories or fixtures?Rails testing: factories or fixtures?
Rails testing: factories or fixtures?
 
Automated testing with RSpec
Automated testing with RSpecAutomated testing with RSpec
Automated testing with RSpec
 
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
Real-time hypermedia APIs: Exploring the fundamentals of how we build network...
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 

Semelhante a How to improve our acceptance tests - Pyccuracy VS Splinter

Enabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsEnabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsKonstantin Kudryashov
 
Write Tests in End Users’ Lingo
Write Tests in End Users’ LingoWrite Tests in End Users’ Lingo
Write Tests in End Users’ LingoIndicThreads
 
Story-driven Testing
Story-driven TestingStory-driven Testing
Story-driven TestingBrian Hogan
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsSteve Malsam
 
I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)xsist10
 
Transformando os pepinos do cliente no código de testes da sua aplicação
Transformando os pepinos do cliente no código de testes da sua aplicaçãoTransformando os pepinos do cliente no código de testes da sua aplicação
Transformando os pepinos do cliente no código de testes da sua aplicaçãoRodrigo Urubatan
 
I put on my mink and wizard behat
I put on my mink and wizard behatI put on my mink and wizard behat
I put on my mink and wizard behatxsist10
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybarafatec
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybarafatec
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabashkellinreaver
 
User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)Jean-Michel Garnier
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Jean-Loup Yu
 
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...Ho Chi Minh City Software Testing Club
 
I put on my mink and wizard behat - Confoo Canada
I put on my mink and wizard behat - Confoo CanadaI put on my mink and wizard behat - Confoo Canada
I put on my mink and wizard behat - Confoo Canadaxsist10
 
ITB2017 - Intro to Behavior Driven Development
ITB2017 - Intro to Behavior Driven DevelopmentITB2017 - Intro to Behavior Driven Development
ITB2017 - Intro to Behavior Driven DevelopmentOrtus Solutions, Corp
 
How React Native Appium and me made each other shine
How React Native Appium and me made each other shineHow React Native Appium and me made each other shine
How React Native Appium and me made each other shineWim Selles
 
Embracing Capybara
Embracing CapybaraEmbracing Capybara
Embracing CapybaraTim Moore
 
Largamos o Cucumber!
Largamos o Cucumber!Largamos o Cucumber!
Largamos o Cucumber!iMasters
 

Semelhante a How to improve our acceptance tests - Pyccuracy VS Splinter (20)

Enabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsEnabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projects
 
Write Tests in End Users’ Lingo
Write Tests in End Users’ LingoWrite Tests in End Users’ Lingo
Write Tests in End Users’ Lingo
 
Story-driven Testing
Story-driven TestingStory-driven Testing
Story-driven Testing
 
I, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot OverlordsI, For One, Welcome Our New Robot Overlords
I, For One, Welcome Our New Robot Overlords
 
I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)I put on my mink and wizard behat (talk)
I put on my mink and wizard behat (talk)
 
Transformando os pepinos do cliente no código de testes da sua aplicação
Transformando os pepinos do cliente no código de testes da sua aplicaçãoTransformando os pepinos do cliente no código de testes da sua aplicação
Transformando os pepinos do cliente no código de testes da sua aplicação
 
I put on my mink and wizard behat
I put on my mink and wizard behatI put on my mink and wizard behat
I put on my mink and wizard behat
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybara
 
Quick ref capybara
Quick ref capybaraQuick ref capybara
Quick ref capybara
 
Android testing calabash
Android testing calabashAndroid testing calabash
Android testing calabash
 
User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)User Acceptance Testing Driven by Humans telling Stories (with RSpec)
User Acceptance Testing Driven by Humans telling Stories (with RSpec)
 
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
Green Light for the Apps with Calaba.sh - DroidCon Paris 2014
 
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
A Universal Automation Framework based on BDD Cucumber and Ruby on Rails - Ph...
 
I put on my mink and wizard behat - Confoo Canada
I put on my mink and wizard behat - Confoo CanadaI put on my mink and wizard behat - Confoo Canada
I put on my mink and wizard behat - Confoo Canada
 
ITB2017 - Intro to Behavior Driven Development
ITB2017 - Intro to Behavior Driven DevelopmentITB2017 - Intro to Behavior Driven Development
ITB2017 - Intro to Behavior Driven Development
 
How React Native Appium and me made each other shine
How React Native Appium and me made each other shineHow React Native Appium and me made each other shine
How React Native Appium and me made each other shine
 
BDD - Collaborate like you mean it!
BDD - Collaborate like you mean it!BDD - Collaborate like you mean it!
BDD - Collaborate like you mean it!
 
Embracing Capybara
Embracing CapybaraEmbracing Capybara
Embracing Capybara
 
Largamos o cucumber
Largamos o cucumberLargamos o cucumber
Largamos o cucumber
 
Largamos o Cucumber!
Largamos o Cucumber!Largamos o Cucumber!
Largamos o Cucumber!
 

Último

UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdfPaige Cruz
 
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Alexander Turgeon
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5DianaGray10
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimizationarrow10202532yuvraj
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 

Último (20)

UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
 
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 

How to improve our acceptance tests - Pyccuracy VS Splinter

  • 1. Fernando Sandes How to improve our acceptance tests !
  • 2. What is better? Pyccuracy vs
  • 4. It`s not (only) about the technology
  • 5. It`s an ideologica difference
  • 6. @gabrielfalcao Lettuce`s creator The problem is that differently of cucumber and lettuce, pyccuracy is aimed to web testing, with pre-defined "step definitions" (pyccuracy uses a different nomenclature), and when I was using it I found extremely hard to maintain the tests as the test suite grows, it's a hell! lettuce
  • 7. @gabrielfalcao Lettuce`s creator “So I wrote lettuce to make it super flexible so that I could write my own definitions in a super easy way, and never couple my tests to robotic step definitions.” lettuce
  • 8. Pyccuracy ROBOTIC STEP DEFINITIONS
  • 9. ROBOTIC STEP DEFINITIONS Given I fill the field "#username" with "test" And I fill the field "#password" with "1234" When I click on the button 'input[type="submit"]' Then I see the page contains the text "Hello Test User!" Given I am at the login page And I fill in the login information with "test" and password "1234" When I click on the login button Then I see I'm logged in as a normal user
  • 10. ROBOTIC STEP DEFINITIONS Given I fill the field "#username" with "test" And I fill the field "#password" with "1234" When I click on the button 'input[type="submit"]' Then I see the page contains the text "Hello Test User!" “You can see how your business it better defined here” Given I am at the login page And I fill in the login information with "test" and password "1234" When I click on the login button Then I see I'm logged in as a normal user
  • 11. DONT`T BE THE BOILING FROG ! The presence of step definitions leads people down a very bad path. While it gives people a head start in writing scenarios it also tricks people into writing scenarios are extremely verbose and fragile. People don't always realize this, so they continue cranking out lots of crap scenarios based on pre-steps. This is like the boiling frog story
  • 12. IT`S ABOUT THE DOMAIN ! The “domain” is defined by the value the stakeholders and users hope to achieve with the software. This can be booking a ticket or sharing pictures with friends or an infinite number of activities. Clicking links and buttons or filling in text fields has nothing (directly) to do with the domain.
  • 15. Imperative VS Declarative Scenarios in User Stories
  • 16. The imperative style uses highly reusable Imperative granular steps which outlines user interface. much of the This binds the scenario to that interface. Scenario: Successful login Given a user "Aslak" with password "xyz" And I am on the login page And I fill in "User name" with "Aslak" And I fill in "Password" with "xyz" When I press "Log in" Then I should see "Welcome, Aslak“
  • 17. The imperative style uses highly reusable Imperative granular steps which outlines user interface. much of the This binds the scenario to that interface. Scenario: Successful login Scenario: User is greeted upon login Given a user "Aslak" with password "xyz" Given the user "Aslak" has an account And I am on the login page When he logs in And I fill in "User name" with "Aslak" Then he should see "Welcome, Aslak" And I fill in "Password" with "xyz" When I press "Log in" Then I should see "Welcome, Aslak“ Declarative
  • 18. The imperative style uses highly reusable Imperative granular steps which outlines user interface. much of the This binds the scenario to that interface. Scenario: Successful login Scenario: User is greeted upon login Given a user "Aslak" with password "xyz" Given the user "Aslak" has an account And I am on the login page When he logs in And I fill in "User name" with "Aslak" Then he should see "Welcome, Aslak" And I fill in "Password" with "xyz" When I press "Log in" Then I should see "Welcome, Aslak“ Declarative
  • 19. Imperative Declarative When we’re describing other parts of the system that require login, the login details like user name, password and how to log in are only distracting. That is why we make it a one-liner.
  • 22. COMMUNICATION IS THE GOAL! To use a BDD tool "right", one has to understand that the main goal is primarily about communication and secondarily about testing.
  • 23. COMING BACK… And about technology
  • 24. SPLINTER Splinter was not created to be another acceptance tool, but an abstract layer over other tools, its goal is provide a unique API that make acceptance testing easier and funnier :)
  • 25. SPLINTER A LOT OF OPTIONS !
  • 26. HEADLESS OR NOT HEADLESS ?
  • 28. NOT HEADLESS SLOW EASY TO DEBUG USE THE BROWSER
  • 31. SERVER HEADLESS LOCAL
  • 32. NOT HEADLESS SERVER HEADLESS LOCAL
  • 33. SPLINTER and more… http status code multi webdrivers css ,xpath, tag, name selectors support to iframe and alert execute javascript work's with ajax and async javascript
  • 34. SPLINTER Browser • visit(‘url’) • reload() • quit() • html • url • title
  • 35. SPLINTER Searching elements • find_by_css(‘.classe’) • find_by_id(‘meuid’) • find_by_xpath(‘//body’) • find_by_tag(‘a’) • find_by_name(‘search’)
  • 36. SPLINTER Forms • fill(‘name’, ‘value’) • attach_file(‘name’, ‘/path/to/file.txt’) • check(‘name’) #checkbox • choose(‘name’, ‘value’) #radio button • select(‘name’, ‘option’)
  • 38. SIKULI http://sikuli.org/index.shtml
  • 39. NEEDLE http://needle.readthedocs.org #AUTOMATED TESTS FOR CSS from needle.cases import NeedleTestCase class GoogleTest(NeedleTestCase): def test_footer(self): self.driver.get('http://www.google.com') e = self.driver.find_element_by_id('fctr') self.assertScreenshot(e, 'google-footer') self.assertEqual(e.get_computed_property('font-size'), '13px')