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

Practice Problem

Hard

Created by

Wayground 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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?