Answer the question
In order to leave comments, you need to log in
How to prepare a platform for automated testing?
Good day!
In the company where I work, automated testing is just beginning to be implemented, and a lot of organizational issues arise. In particular, one of them is how to properly approach the creation of a test bench.
At the moment, all tests are performed on an exact copy of the working project, or rather, all new functionality and fixes are laid out on this test site, and then it is completely moved to the working server. An obvious disadvantage when testing is that there is no test data. For example, if you want to perform a record edit check, then the record must first be created. There are tests that do this, but if they fail, then the edit record test will fail by default.
Hence the question, how to properly approach the organization of a test site? Should it already contain all the necessary test data when laid out? Or is it more correct to prepare test data before each test, for example, so that the script adds a record that we will edit in tests, the user who will do this fill in the fields that we will check?
And there are some ready-made solutions to simplify this task?
Thanks in advance for the replies and that they don't include something like "hire a professional". (=
UPD: tech stack
tests: python - pytest - selenium - selenoid
jenkins - docker - gitlab
Answer the question
In order to leave comments, you need to log in
Functional tests are written with data
A test to "read" data involves writing it
As already mentioned, functional tests fill in data before execution, and clean it up after execution. And this is logical, because. different tests may require completely opposite data.
Read about fixture. And faker is used to generate test data.
По тестовым данным рекомендую иметь их в БД. Умники советущие тебе через морду создавать тест дату не ведают что творят. Морда это самый медленный (подожди тот элемент, подожди этот) и самый рисковый (элемента нет вовремя и тест рухнул). Рекомендую пользоваться бекендом - API или что у вас там (смотри сюда). Иначе случится вот такая беда: 1 тест будет генерить через морду тест дату за 5 секунд и все будет ок, а потом, когда этих тестов станет 1000, генерация тест даты будет занимать уже 83 минуты (ага?).
А вообще, если у тебя докер есть, то что тебе мешает в образ слепок БД заливать?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question