-
Notifications
You must be signed in to change notification settings - Fork 1
395 selenium #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
395 selenium #436
Conversation
|
При попытке сделать POST запрос в файле test_training.py получается ошибка Что я делаю:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Для информации (исправлять не нужно) - для разных образов (точнее Dockerfile'ов) можно указывать свои .dockerignore (ссылка)
tests/selenium/test_training.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Организуйте запуск тест-кейсов аналогично примеру - в дальнейшем у нас будут появляться новые тестовые сценарии, для которых потребуется централизованный запуск (хотя сейчас это и будет только один)
- Вынесите базовую логику теста в отдельный класс
- так будет проще реализовывать следующие тесты
- "TestBasicTraining" по факту уже не "basic", а конкретный TestTraining
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Залил коммит. Запуск тест кейсов как в примере, наверное, характерен для unittest.
Я сделал 3 файла:
- selenium_session - базовая логика для любых будущих селениум тестов
- training_session - базовая логика для тестирования тренировок, основанная на selenium_session, возможно избыточно
- test_simple_training - тест, с которого все началось
Мне кажется, для новых тестов будет проще скопировать test_simple_training и использовать SeleniumSession или TrainingSession
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Просто main.py в случае pytest как будто бы избыточен, я могу ошибаться
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сделал немного мудрее. Теперь Training это просто обертка на SeleniumSession использующая экземпляр последнего. Соотвественно обертки можно менять по ходу тестирования. Более того тесты могут наследоваться, что поможет сформировать четкую иерархию
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Логика и код - ок, добавьте readme для тестов с описанием классов/логики и запуска
No description provided.