Plagiarism and Collusion

CO3095 / CO7095 Coursework Resit 2020-21 (August)
12th May 2022
1 Disclaimer on Plagiarism and Collusion
This is an individual piece of coursework that is assessed. Plagiarism, including collusion, is penalised. For further information check the section Referencing and Academic Integrity in your
Student Handbook (
https://campus.cs.le.ac.uk/ForStudents/).
By submitting your solution, you are stating that this solution is the result of your
sole individual work and that you are aware of the consequences of incurring in plagiarism and/or collusion, as
summarised in the Declaration of Academic Integrity (for MSc Students:
https://goo.gl/pdBicw) and
Declaration of Academic Honesty (for all other students:
https://campus.cs.le.ac.uk/ForStudents/
plagiarism/DoAIF.pdf
) that you will have already signed.
2 Submission
This assignment must be submitted via Blackboard by Wednesday 8th June 2022 17:00 UK
time
.
Learning outcomes being assessed: Students will be able to choose appropriate strategies for software testing and validation, and discuss how to implement them.
The solution to the assignment must be submitted as a single ZIP file named after your student
number, e.g.,
199012345.zip. The zip fule must contain exactly two files:
{ A Word document named 199012345.docx (your student number) with exactly two sections,
one for task 1 and one for task 2. Use font size 12, line spacing 1.5, and
maximum page
count 10
.
{ A single Java file named RoverTest.java containing your JUnit test suite.
Make sure you only include this file.
Make sure your file is readable and contains the source code of your JUnit tests.
Do not include your full Java Project.
To create your zip file for submission, use the following command: zip 199012345.zip 199012345.docx
RoverTest.java
. On Windows, you can use the Windows/File Explorer to locate the two files,
hold down the [Ctrl] key and click on each of the two files
199012345.docx and RoverTest.java,
then right-click and select “Send To”
> “Compressed (Zipped) Folder.”, making sure you name
the resulting zip file
199012345.zip.
No other file will be marked.
3 Tasks
Task 1
You are working as a software engineer at a space exploration software company. You are leading the
technological efforts of the company to develop the software of their soon-to-be-launched Mars rover.
1

The success of your project is critical to the company’s business strategy. As part of this project, you
have formulated an initial plan to develop the software that will run on the Mars rover:

Activity Description Dependency Duration (days)
A
B
C
D
E
F
G
H
I
Architectural Design
Core, Network and Communications
Environment Perception
Environment Mapping
Motion Planning
Sample Management
System Supervisor
Integration Testing
Rover Launch Monitoring

Sub-tasks:
1. Complete the given table with dependencies and task durations. Activity A must come at the start
of the project, followed by activity B. Environment perception is needed for environment planning
and motion planning relies on environment planning. Sample Management can be developed independently from C-E. The system supervisor module can only be developed when all other modules
are completed and should be followed by integration testing and then launch monitoring. Use your
best judgement to assign durations to each activity.
2. Create a network diagram using activity-on-node notation, capturing the dependencies between
the identified activities.
3. Identify the critical path for the network diagram.
4. Compute the
slack for all activities and briefly discuss the meaning of the computations.
5. Once the project has started, it turns out that the activity D (Environment Mapping) takes twice
as much time as it was initially planned. Discuss the impact of this delay on the project timeline.
Task 2
Assume you have a Java method with the following signature:
public static boolean collectSample(Sample sample)
The method is responsible for verifying whether the sample picked up from the surface of Mars should
be stored in the rover sample container or not, depending on a number of factors and conditions, e.g.,
properties of the sample such as its weight, material, colour (feel free to define your own
Sample class;
no need to provide code for this, simply define public fields/properties), and environmental properties
such as whether a similar sample already exist in the rover container, whether there is space left in the
container, etc.
Your task is to use the Category Partition Method to construct test sets for the
collectSample
method, identifying at least three categories for the variable sample and at least three categories for the
environment (e.g., rover container). You must:
1. Present the categories, providing a justification for each of them.
2. Identify reasonable constraints to link categories if/where appropriate.
3. Manually calculate the number of possible test frames, and discuss the impact of any constraints.
4. Provide a concrete test case, i.e.,
concrete input and the expected output conforming to a particular
test frame.
2

Task 3
Setup:
You are given a Maven project containing one single Java class named Rover. Follow these instructions
to set it up:
Download the project as a zip file named SMQA-Assignment-Resit.zip.
Unzip the file in a local directory.
Import the project as a Maven project in your favourite IDE. All the necessary JUnit dependencies will already be included.
{ On IntelliJ: File > New > Project from Existing Sources … > Import project from external
model
> Maven
{ On Eclipse: File > Import… > Maven > Existing Maven Projects. If you do not see this
option, it may be that you need to install the Maven plugin in your Eclipse, or download the
latest version of Eclipse.
Locate file RoverTest.java under src/test/java. This is the only file you have to edit.
Your task:
Your task is to write a set of JUnit tests in RoverTest.java which achieves 100% branch coverage of
the
Rover class.
All your JUnit tests should be implemented in class RoverTest. You may not create
additional classes in the project.
Each test must contribute to improving branch coverage. Redundant tests will lose marks.
Each test must be named appropriately. Tests with meaningless names such as test0…testN
will lose marks.
Each test must contain at least one assertion. Tests without assertions will lose marks.
Do not change any class names or package names.
4 Marking Criteria
All the tasks in the assignment bear equal weight.
Distinction
The planning task has been carefully developed and all the artefacts produced (network diagram,
critical path) are mostly correct.
The categories are carefully thought out and well justified, and identified constraints between
categories are formulated in a sensible way without raising the possibility of excluding valid test
cases.
The number of resulting test frames has been correctly worked out and the process is clear.
The test case is clearly presented, along with an anticipated output. If the output cannot be
predicted (e.g., because we do not have access to implementation details), a well-reasoned guess is
provided.
The set of JUnit tests achieves full branch coverage and each unit test contributes uniquely to
improving coverage.
3

Merit
The planning task has been carefully developed and the artefacts produced (network diagram,
critical path) are mostly correct.
The categories are carefully thought out, and well justified.
The number of resulting test frames has been correctly worked out for the categories.
A test case is presented along with an anticipated output. If the output cannot be predicted (e.g.,
because we do not have access to implementation details), a well-reasoned guess is provided.
The set of test cases comes close to achieving full branch coverage.
Pass
The planning task has been attempted and some of the artefacts produced are correct (network
diagram, critical path).
Some categories were identified which make some sense.
The number of resulting test frames has been worked out but the process is unclear.
A test case is presented but the relation input-output is not clear. If the output cannot be predicted
(because it relies on logic that we do not have access to) – a well-reasoned guess is provided.
The set of test cases achieves at least 50% branch coverage and some of them are well described.
Fail
The planning task has been attempted but all the artefacts produced are flawed (network diagram,
critical path).
There has been a serious misunderstanding of the category partition method. The categories do
not make sense, and most justifications are fundamentally flawed.
The set of test cases achieves less than 50% branch coverage.
4