- 作业标题:CSCI 2134 - Software Development - lab 8 Requirements Testing
- 课程名称:Dalhouse University CSCI 2134 Software Development
- 完成周期:1天
Objective
In this lab, you will review a specification for a class and ensure that the unit tests match the
requirements. Working in groups of one or two students, you will identify what tests are
missing or not matching the specification and either add tests or note where the specification
can be improved.
Preparation
- Ensure that you have your Integrated Development Editor (IDE) installed.
- Ensure that you are able to write and run a JUnit test case in the IDE. You will not have the
time to both debug your IDE environment and complete the lab task within the lab time.
The lab time should be able to concentrate on the lab task. - Clone the Lab 8 repo: https://git.cs.dal.ca/courses/2021-fall/csci-2134/lab8/????.git
where ???? is your CSID. - Review the provided code listed in the Resources section below by reading the code of the
class you will be fortifying (Matrix.java) and the unit tests (MatrixTest.java).
These files are located in the src and test directories of the cloned project.
Resources
• Documentation at the end of this document
• Code base to be reviewed compliance is in the src directory of the Lab 8 repository.
• Test code is in the test directory of the Lab 8 repository.
Procedure
Set-up
- Decide if you wish to work by yourself or pair up with another student
- Open the project you created in preparation for this lab
- If you are working in pairs, be sure the both of your names are listed in the FIX LIST at the
top of MatrixTest.java
Lab Steps
Review the Matrix class specification at the end of this document and the code in
MatrixTest.java.- Select a method or constructor
- Compare the specification of the method/constructor with the unit tests for it.
- Identify a gap where the tests don’t cover the specification, or the specification does not
match the tests. - If no gap is found, select another method/constructor.
If there are tests missing for a method/constructor, add a unit test to MatrixTest.java
to fix the issue. If the specification is ambiguous or missing information, proceed directly to
Step 4.Rerun the unit tests to ensure you did not introduce any problems. Fix them, if you did. J
Note the issue in the FIX LIST at the top of MatrixTest.java (see item 0 in the FIX
LIST of that test file, including current time).Commit and push back to the repository.
Repeat until all issues have been reviewed and fixed.
Analysis and Reporting
- Categorize (in the FIX LIST) all issues you find as either (a) testing issue, (b) specification
issue, or (c) other. If the issue is (c) be sure to explain what the issue is. - Commit and push the project.
Grading
The lab will be marked out of 4 points
。。。