Imagine you have to check 100 doors to see if they lock properly. Doing it by hand takes a long time. How does automation help in this situation?
Think about how machines can work continuously without getting tired.
Automation speeds up testing by running repetitive tasks quickly and without breaks, unlike humans who need rest.
What is the output of this Python code that simulates test execution times?
test_cases = 50 manual_time_per_test = 2 # minutes automation_time_per_test = 0.5 # minutes setup_time = 10 # minutes manual_total = test_cases * manual_time_per_test automation_total = setup_time + (test_cases * automation_time_per_test) print(f"Manual: {manual_total} min, Automation: {automation_total} min")
Calculate total time for manual and automation separately.
Manual total is 50 tests * 2 min = 100 min. Automation total is 10 min setup + 50 * 0.5 min = 35 min.
You want to check if automated tests run faster than manual tests. Which assertion correctly tests this?
manual_time = 120 # seconds automation_time = 45 # seconds # Choose the correct assertion below:
Automation should be faster, so its time is less.
The assertion checks that automation_time is less than manual_time, confirming automation is faster.
What error will this code produce when calculating total automation time?
test_cases = 30 setup_time = 5 automation_time_per_test = '0.5' total_time = setup_time + (test_cases * automation_time_per_test) print(total_time)
Check the data types used in multiplication.
Multiplying an integer by a string causes a TypeError in Python.
Which option describes the best way to accelerate testing using automation in a Continuous Integration/Continuous Deployment (CI/CD) pipeline?
Think about how fast feedback helps developers fix problems quickly.
Running automated tests on every code change helps find bugs early and speeds up the release process.