Answer the question
In order to leave comments, you need to log in
What should white box autotests look like?
What should white box autotests look like? I faced the question to myself whether I am writing autotests correctly.
For example, I'm testing logging:
- Open Url "example.com"
- Enter "user" in the login field
- Enter "password" in the password field
- Press the [Login] button
And at the same time, let's say opening your profile page:
- Open Url "example .com"
- Enter "user" in the login field
- Enter "password" in the password field
- Press the [Login] button
- Press the profile pictures
- Press the [Profile]
button - Press the [Setting] button
- Check the items on the Profile-> page Setting
Those. the deeper I get into the modules, the more steps, etc. Is that right? Because it seems to me that such a lump does not look so hot, although on the other hand you can see at what step the test failed. Can anyone give a couple of tips or sources for raising skills?
Answer the question
In order to leave comments, you need to log in
It's normal for code to look like a repetitive set of specific steps. In the future, when writing tests, you will resort to refactoring and optimization, and, for example, in the second case, simply call the login ( ) method with the necessary data, instead of copy-pasting the login block for each test.
More.
Tests should look something like this:
Initial data: site, login, password
Scenario: what to do, where to go, what to enter
Result: what we expect to see, hear, read
You do not have a specific assumption of what we expect.
For example: logged in, we see the inscription, "exit from your personal account." There is an inscription - the login test is passed. There is no inscription - it will not pass. The reasons may be different
Must read: Romana Savin - Testing .com
To improve skills: Testbase
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question