AQA Test Automation Lesson 5, fixture part 2, scope

preview_player
Показать описание
Hi, thanks for viewing.

Tasks for better understanding:
Task 1
Create fixtures to simulate data retrieval from an API with different scopes. You need to create fixtures for each of the main scopes (function, class, module, package, session) that will return simulated API data. Write tests that run only for two scopes: function and session.
Task 2
Create a fixture named initial_data with a module scope, which returns a list with three names. Write a test named test_data_length that checks the length of the list, and write two tests where you use this fixture.
Task 3
Rewrite the test from the previous lesson where we had Class TestA containing setup_method and teardown_method. Create three tests inside this class. Please write in comments to which scope your setup_method and teardown_method belong. If you have a verification subscription, indicate the scope in the homework submission.

Test based on this lesson:
Рекомендации по теме