Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automation Frameworks: First Contact

apetkova
September 16, 2018

Automation Frameworks: First Contact

A collection of principal and practical advice on building functional automation frameworks from scratch.
Presented at HackConf 2018, Sofia , Bulgaria

apetkova

September 16, 2018
Tweet

More Decks by apetkova

Other Decks in Technology

Transcript

  1. Automation
    Frameworks:
    FIRST CONTACT

    View full-size slide

  2. Aneta
    Petkova
    QA Chapter Lead,

    View full-size slide

  3. THE QUESTIONS
    Laying the proper foundation

    View full-size slide

  4. Q1: THE LANGUAGE
    5
    Ø Project primary
    Ø Personal favourite
    Ø Popularity

    View full-size slide

  5. 6
    Q2: REPOSITORY
    Ø Product Architecture
    Ø Repo restrictions

    View full-size slide

  6. 7
    Q2: REPOSITORY
    Ø Product Architecture
    Ø Repo restrictions
    Ø Execution - CI

    View full-size slide

  7. Q3: TEST
    LEVEL
    UNIT
    API
    UI

    View full-size slide

  8. Q4: SCENARIO FORMAT
    9
    No format
    1. Open a browser
    2. Go to Google
    3. Search for a
    string
    4. Assert total
    number of
    results is
    displayed
    Given-When-Then
    Given I can open a
    browser
    And go to Google
    When I search for a
    string
    Then I should see
    the total number of
    results
    Screenplay
    As Any (the browsing
    girl)
    I want to see the
    total number of my
    search results on
    Google
    So I know how many
    results to consider

    View full-size slide

  9. Q5: TEST RUNNER
    10
    Ø Experience in your team
    Ø Feature support: reporting,
    parallelism, CI plugin
    Ø Popularity

    View full-size slide

  10. Q6: ARTIFACTS
    11
    Ø Report
    Ø Logs
    Ø Screenshots

    View full-size slide

  11. ANSWER TIME!
    12
    Q6:
    ARTIFACTS
    Q5:
    RUNNER
    Q4:
    FORMAT
    Q3:
    LEVEL
    Q2:
    REPO
    Q1:
    LANGUAGE
    RUBY STAND
    ALONE
    CUCUMBER
    API REPORTS
    LOGS
    G-W-T

    View full-size slide

  12. Ruby sample structure
    demo-framework/
    ├── app
    ├── config
    ├── features
    ├── test-output
    ├── Gemfile
    ├── Gemfile.lock
    ├── README.md

    View full-size slide

  13. Ruby sample structure
    ├── app
    │ ├── common
    │ │ ├── mock_data_factory.rb
    │ ├── db
    │ ├── model
    │ │ ├── credentials.rb
    │ │ ├── personal_profile.rb
    │ │ └── user.rb
    │ └── service
    │ ├── auth_service.rb
    │ └── user_service.rb

    View full-size slide

  14. Ruby sample structure
    ├── config
    │ ├── initializers
    │ │ ├── app.rb
    │ │ └── state.rb
    │ ├── config.yml.sample
    │ ├── cucumber.yml
    │ ├── report_builder_config.rb

    View full-size slide

  15. Ruby sample structure
    ├── features
    │ ├── features_api
    │ │ └── user_account.feature
    │ ├── step_definitions
    │ │ └── user_steps.rb
    │ └── support
    │ ├── env.rb
    │ └── hooks.rb

    View full-size slide

  16. Ruby sample structure
    ├── test-output
    │ ├── features_report.html
    │ └── features_report.json

    View full-size slide

  17. Ruby Tooling
    Ø Cucumber
    Ø DB: ActiveRecord
    Ø Rest & Logging: Sail (internal)
    § rest-client
    § colorize
    Ø ReportBuilder

    View full-size slide

  18. Reporting:
    Jenkins

    View full-size slide

  19. IT’S NOT THAT HARD, THEN?

    View full-size slide

  20. IT’S NOT THAT HARD, THEN?
    Image:
    /volandil

    View full-size slide

  21. No rocket science.
    Just tools,
    experience and skill.

    View full-size slide

  22. THANK YOU!
    Any questions?
    You can find me at:
    anetavp
    /apetkova
    Credits
    Slides: SlidesCarnival
    Graphics: https://freepik.com
    Star Wars/Star
    Trek/Stargate/Marvel universe
    objects belong to their
    respective owners
    27

    View full-size slide