Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Automation testing with no URL

We are provided with gherkins and asked to create feature files and perform automation testing when only UI prototypes are available and there is no URL provided. Is there a way to perform testing when there is no url available?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You can "write" tests when there is no URL available by using the Gherkin format. Here’s an example for some calculator tests:

Feature: Scenarios for the Calculator App

  Background:
    Given Open the Calculator App

  Scenario: Pressing "C" outputs "0"
    When Press C
    Then Verify output is "0"

  Scenario: 1 + 2 + 3 + 4 + 5 = 15
    When Press C
    And Press 1
    And Press +
    And Press 2
    And Press +
    And Press 3
    And Press +
    And Press 4
    And Press +
    And Press 5
    And Press =
    Then Verify output is "15"

  Scenario: 6 × 7 × 8 × 9 = 3024
    When Press C
    And Press 6
    And Press ×
    And Press 7
    And Press ×
    And Press 8
    And Press ×
    And Press 9
    And Press =
    Then Verify output is "3024"

(The above examples of a Gherkin feature file were taken from the SeleniumBase Behave-BDD examples folder, which I wrote. It requires a steps file with definitions in order to work.)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading