Design test cases to verify a computer program : Testing Classes

Design test cases to verify a computer program : Testing Classes

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial covers testing a printer class in Python. It begins with setting up a test case and writing the first test to check the printer's capacity and speed. The instructor explains the importance of using a float for pages per second and discusses different ways to validate test results. The video then delves into the setup method, emphasizing the need for a new printer object for each test to avoid state issues. It concludes with a discussion on setup class and teardown methods, advising against sharing objects across tests to maintain test integrity.

Read more

2 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the purpose of the setup method in testing?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

Why is it recommended not to share the printer object across tests?

Evaluate responses using AI:

OFF