Answer the question
In order to leave comments, you need to log in
How to properly use Given, when and then in UI testing for input without data?
I am doing my own project which is testing the UI. From time to time I read articles and came across one article about GWT. In this article, the message was that all three parts are required. But I have a question: in my project I practically do not use given, how bad is it?
If I understood correctly, then given - "such and such values are given", but in my tests it is extremely rare to use given, because there you need to click a lot (check boxes, click on the button, etc.) to "enter some then data". Those. looking at the examples, let's say:
Given: I have the number 3 and 5
When: I add them
Then: the result is 8
I don't quite understand how to do given in my case.
The problem is that you can't do something like this:
Given: click on button A
Given\And: click on button B
Then: object C created
Question: is it okay to not use Given when testing UI, if data input is an interaction with the interface? Those. values cannot be set.
If you need to always use given, then give an example of how to do it correctly in order to test user authorization on the login form (there is a text field with a login and a text field with an e-mail and a login button).
Answer the question
In order to leave comments, you need to log in
Question: Is it okay to not use Given when testing UI, if data input is an interaction with the interface? Those. values cannot be set.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question