0
0
Software Engineeringknowledge~10 mins

Regression testing in Software Engineering - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the regression testing module.

Software Engineering
import [1]
Drag options to blanks, or click blank then click option'
Aunittest
Bpytest
Cregression_testing
Drandom
Attempts:
3 left
💡 Hint
Common Mistakes
Importing unittest or pytest instead of the regression testing module.
2fill in blank
medium

Complete the code to run regression tests on the model.

Software Engineering
result = regression_testing.run([1])
Drag options to blanks, or click blank then click option'
Amodel
Bdata
Caccuracy
Dloss
Attempts:
3 left
💡 Hint
Common Mistakes
Passing data or metrics instead of the model to the regression test.
3fill in blank
hard

Fix the error in the regression test assertion.

Software Engineering
assert [1] == expected_output, "Regression test failed"
Drag options to blanks, or click blank then click option'
Adata
Boutput
Cmodel
Dresult
Attempts:
3 left
💡 Hint
Common Mistakes
Using variables like output or model which are not the test result.
4fill in blank
hard

Fill both blanks to create a regression test function that returns True if tests pass.

Software Engineering
def regression_test_[1]():
    result = run_test()
    return result [2] expected
Drag options to blanks, or click blank then click option'
Afunction
B==
C!=
Dcheck
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' for comparison.
Using incorrect function name parts.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps test names to pass status.

Software Engineering
test_results = [1]: run_test([2]) [3] [2] in test_names
Drag options to blanks, or click blank then click option'
A{name
Bname
Cfor
Din
Attempts:
3 left
💡 Hint
Common Mistakes
Missing curly brace or using wrong keywords in comprehension.