Answer the question
In order to leave comments, you need to log in
Where can I find Best practice for writing functional tests for Selenium Webdriver?
I am learning Selenium WebDriver, language is Java.
Interested in writing functional tests.
How to make tests independent of each other? For example, each action requires prior user authorization. Should this functionality be placed in a separate test, and all other tests based on the premise that authorization was successful? Or should authorization be used in every test as a precondition?
Thank you.
Answer the question
In order to leave comments, you need to log in
In the Ruby ecosystem, Cucumber was written just as a tool for describing functional tests.
And there it is a common practice to write in the spirit of
Given user authenticated
And viewing / categories
page at the beginning of each test, we describe the initial state. Moreover, if you have 10 tests (scenarios) with the same initial state, then in Cucumber all this is placed in the Background section, which describes the initial states common to all scenarios.
Try the following options:
1) Mink + Behat (Gherkin notation)
2) Codeception ( codeception.com/)
In particular, this seems to be what you are looking for: codeception.com/docs/07-AdvancedUsage
Here you can set dependencies and preconditions (postconditions ). This framework is highly configurable and expandable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question