Quiz
All Quizzes
This quiz has question types that open in the usual player.
Questions in this quiz (22)
1Identify the 4 elements to a testing framework.
- ATest suite
- BTest fixture
- CTest coverage
- DTest runner
- ETest case
2Which of the following are examples of Functional testing?
- ARegression teting
- BUsability Testing
- CPerformance Testing
- DUnit testing
3In what phases does testing take place?
- AMaintenance
- BDesign
- CImplementation
- DVerification
4What happens in requirements phase?
- ACraft user stories and use cases
- BIdentifying the software languages to use
- CProduce a design document
- DInterviews with stakeholders
5Which of the following are examples of non-functional testing?
- AIntegration testing
- BUnit testing
- CScalability testing
- DPerformance testing
6Unit testing is when the smallest component of a software system is verified to produce the expected behavior
- ATrue
- BFalse
7Given the following scenario, identify if it would best be tested manually or with an automated system.
You are a game developer and received an angry email from a customer saying they fell through the ground when trying to climb a particular hill.- AManual
- BAutomated
8Given the following scenario, identify if it would best be tested manually or with an automated system.
You want to ensure developers verify their code doesn't break existing features before adding it to the centralized repository.- AManual
- BAutomated
9What happens during design phase?
- ADetermine acceptable software performance
- BProduce the design document
- CStart coding
- DLay out the architecture of the program
10What are the 5 phases of the software development process covered in this course?
- AStakeholders
- BPlanning
- CImplementation
- DVerification
- EDesign
- FMaintenance
- GRequirements
11The Therac-25 machine was used for radiation therapy in the 1980's. It had two modes of radiation: low and high. During the accidents, the machine would incorrectly display the machine was set to low power when in fact it was configured for high power. What initiated the deadly chain of events?
- APoor UI
- BFailure to update the software with an urgent patch
- CA brief power surge during the realignment phase
- DThe technician input commands very quickly
12A FAILURE occurs because of a "bug" in the code: a fault
- ATrue
- BFalse
13[blank_start]Stubs[blank_end] contain predefined data that is returned when called, but do not imitate behavior.
- AStubs
14[blank_start]Mocks[blank_end] simulate the behavior of a service and its actions can be verified.
- AMocks
15Given the following code snippet, what goes in the blank?
from unittest.mock import Mock
mock = Mock()
# Set return_value
mock.abs.______ = "7"- Areturn
- Breturn_value
- CreturnValue
- Dvalue
16Given the following snippet. If we wanted to use a mock to trigger an exception, what would we use in the blank?
# Mock file reader to control its behavior
open = Mock()
def load_file():
# Does absolutely nothing other than raise the desired exception
content = open('temp_file.txt')
if content.length != 0:
return content
return None
class TestCase(unittest.TestCase):
def test_read_file(self):
# Test for IOError
open.______ = IOError
# This is a context manager that allows us to test for exceptions
with self.assertRaises(IOError):
load_file()- Aside_effect
- Bexception
- Cthrow
- Draise
17Context: Mocks
Given the following code snippet, what is the output of the print statement?
mock = Mock()
mock.func("Hello World")
mock.func("Greetings Planet")
print(mock.func.call_args)- Acall('Hello World')
- B[call('Hello WOrld'), call('Greetings Planet')]
- Ccall('Greetings Planet')
- Dundefined
18If we want to override the behavior of an imported item, we need to use: patch.
- ATrue
- BFalse
19Which of the following is called BEFORE EACH test case in a TestCase object?
- AsetUp()
- BsetUpClass()
- CtearDown()
- DtearDownClass()
20Which of the following is called AFTER ALL the test cases in a TestCase Object are run (not after EACH test)?
- AsetUP()
- BsetUpClass()
- CtearDown()
- DtearDownClass()
21The @classmethod used with setUpClass() and tearDownClass() is called: a modifier
- ATrue
- BFalse
22Why not just put all the set up steps within each step? Because we want to keep our code [blank_start]DRY[blank_end]. (3 letters)
- ADRY
Information
- Description
- Undergraduate CS 362 Quiz on All Quizzes, created by Claire Woodford on 09/12/2023.
- Author
- Claire Woodford
- Language
- English
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz