Difference between revisions of "DIT085 Ed 2016 Practical Phase 1"

From CERES
Jump to: navigation, search
Line 9: Line 9:
 
= General Description =  
 
= General Description =  
  
The first phase of this project concerns test-driven development of the Odroid communication module.
+
The first phase of this project concerns test-driven development of the Arduino communication module.
 
This  module implements the basic functionalities regarding adding new sensor data to the output bitstream buffer, reading the latest speed and angle data from the input bitstream buffer, removing an arbitrary number of bits  from the output bitstream buffer  and adding an arbitrary number of bits to the input bitstream buffer.   
 
This  module implements the basic functionalities regarding adding new sensor data to the output bitstream buffer, reading the latest speed and angle data from the input bitstream buffer, removing an arbitrary number of bits  from the output bitstream buffer  and adding an arbitrary number of bits to the input bitstream buffer.   
  
The former two interfaces (sending sensor data and reading speed data) are used by the higher level sensor and control modules on Odroid and  
+
The former two interfaces (sending sensor data and reading speed data) are used by the higher level sensor and control modules on Arduino and  
 
the latter two interfaces (removing and adding bits from/to the buffers) are called by the lower level communication modules responsible for the USB connection.  
 
the latter two interfaces (removing and adding bits from/to the buffers) are called by the lower level communication modules responsible for the USB connection.  
  
Line 19: Line 19:
 
The following list provides more details of the functionality of these interfaces
 
The following list provides more details of the functionality of these interfaces
  
* Send Sensor Data: This interface has three input parameters (torque, ultra_distance and ir_distance). You may assume that all these parameters are double precision floating point values. It is your choice how to convert these values into packets of bitstreams with appropriate delimiters and error detection or error correction bits. Having proper delimiters and error detection mechanisms is mandatory.  
+
* Send Sensor Data: This interface has three input parameters (torque, ultra_distance and ir_distance). You may assume that all these parameters are double precision floating point values. It is your choice how to convert these values into packets of bitstreams with appropriate delimiters and error detection or error correction bits. Having proper delimiters and error detection mechanisms for each packet is mandatory.  
  
  

Revision as of 15:03, 18 December 2015

Objectives

The objective of phase 1 is to apply the following techniques and tools in a practical case study:

  • Interface design,
  • Test-Driven Development,
  • Functional test design, and
  • Unit Testing and jUnit tool.

General Description

The first phase of this project concerns test-driven development of the Arduino communication module. This module implements the basic functionalities regarding adding new sensor data to the output bitstream buffer, reading the latest speed and angle data from the input bitstream buffer, removing an arbitrary number of bits from the output bitstream buffer and adding an arbitrary number of bits to the input bitstream buffer.

The former two interfaces (sending sensor data and reading speed data) are used by the higher level sensor and control modules on Arduino and the latter two interfaces (removing and adding bits from/to the buffers) are called by the lower level communication modules responsible for the USB connection.

The USB connection is unreliable and hence the interfaces to the higher-level modules should be able to deal with corrupted bitstreams that result from connection loss or collisions.

The following list provides more details of the functionality of these interfaces

  • Send Sensor Data: This interface has three input parameters (torque, ultra_distance and ir_distance). You may assume that all these parameters are double precision floating point values. It is your choice how to convert these values into packets of bitstreams with appropriate delimiters and error detection or error correction bits. Having proper delimiters and error detection mechanisms for each packet is mandatory.



Deliverables

There are two main deliverables for this phase: a single pdf file documenting the outcome of each and every of the following steps and a .zip file containing the source code of the software implemented as the final outcome of this phase.

Part 1: Interface and Test Design

The first deliverable concerns the interface and the test design of the above-specified module. For the interface, you need to specify the signature of the methods: name, input argument types, and output return type. For each interface method, you need to give its specification in the following form:

/**

  Description

  Pre-condition:

  Post-condition: 
  
  Test-cases:

*/



To design your tests, first use one of the functional testing methods (preferably: classification tree or decision table) to partition the domain of different inputs (or output) using the above-given requirements. Then define a test suite (a set of test-case) with concrete input values and expected outputs.

Your deliverables will be judged based on:

  • soundness: whether the interfaces and their specifications have been correctly specified (according to the requirements), the test technique has been correctly exploited to design test cases, and
  • completeness: whether all requirements have been considered and all test-cases necessary to cover them have been given.

Part 2: Test Driven Development

For each and every method, apply the principles of test-driven development to implement the interfaces in order to satisfy each and every test-case. Before you start your implementation, implement your test-cases as a jUnit test. In your report, describe in a step-wise manner how each piece of implementation has been added to fulfil a test-case.


Back to DIT085