BE 1602 Engineering Practice Artefact Requirements and Testing
BE 1602 Engineering Practice Artefact Requirements and Testing
BE 1602 Engineering Practice Artefact Requirements and Testing
1
Week 2
Week 3 Test Plan
Week 5 with - Arash Soleiman Falah
Week 6
Motivations
"The hardest single part of building any system is deciding precisely
what to build. No other part of the conceptual work is so difficult as
establishing the detailed technical requirements, including all the
interfaces to people, to machines, and to other systems. No other
part of the work so cripples the resulting system if done wrong. No
other part is more difficult to rectify later.
Develop Functional
Derive Electric Testing
Technical Components
Requirements
Develop Technical
Software Testing
Components
Design System
Architecture Integrate
Mechanical,
Electric and
Software
Design Phase Requirements Definition and
10
User Requirements
A narrative text (also known as experience blueprint or
customer journey) can be used to describe how the user
interacts with the system at a top level.
Ideas can be developed using brainstorming techniques
A Unified Modelling Language Use Case diagram can also
be used to define how the user interacts with the system
visually so the whole project team comes to a common
understanding.
User Requirements
Narrative Text
A documented description of a system feature
seen from the end-user perspective. The user
story describes what exactly the user wants the
system to do.
A <type of user> wants to perform <some goal> so that <some
reason>
Methods
Brain Writing – separate idea generation from discussion
Rapid Ideation - a time limit is set for individuals to write down as many thoughts or
ideas around the topic as possible, using any mediums available
Round Robin - Once the topic is shared, go around the circle one-by-one and have each
person offer an idea until everyone has had a turn
Starbursting - brainstorming focuses on forming questions rather than answers
Stepladder - every member in the team to contribute individually before being influenced
by everyone else
User Requirements
UML Use Case Diagram
Bank
Provides a high-level overview of the
relationships between actors, different
use cases, and the system
Use cases. Usually drawn with ovals, use
cases represent different use scenarios
that actors might have with the system
(log in, make a purchase, view items,
etc.)
System boundaries. Boundaries are
outlined by the box that groups various
use cases in a system.
Actors. These are the figures that depict
external users (people or systems) that
interact with the system.
Associations. Associations are drawn
with lines showing different types of
relationships between actors and use
cases.
Use Cases vs. Functional Requirements
Consider a cell phone:
On the contrary, unbalanced scales are used when it is expected that responses will be
selected from the scale’s extremes.
Another point to consider is the presence or absence of a scale midpoint. Denying the
ability of neutrality will probably increase the variability towards one extreme or the other.
Additionally, it is sometimes considered impolite to bereft respondents of the choice to be
neutral and force them to select a choice.
Lastly, the number of response alternatives tends to be based on the degree of
discrimination required. For example, by increasing the number of alternatives, it is possible
to decrease the uncertain responses (neutral). However, this also increases the
questionnaire completion time because the respondent has to examine all alternatives.
Between 5 and 7 is usual.
User Testing
Question Creation and Wording
Constructing the wording of questions in a
questionnaire requires attention to:
Vocabulary: It must be clear and precise, avoiding jargon and confusing
terms.
Negatives: Negative phrases such as "Indicate how often you do not eat
breakfast during a week" may appear confusing and misunderstood by the
reader–the negative word should usually be left out.
Double-barrelled questions: These are questions involving two questions at
the same time i.e. “Do you like watching cartoons or eating ice cream”. The
respondent may like cartoons but not ice-cream or vice versa and is thus
confusing to answer one way or another.
Leading questions: These presuppose an event e.g. The statement “Indicate
the sourness of the ice-cream” presumes that the ice cream is de facto
sour. Instead balance the statement “Indicate the level of sweetness or
sourness of the ice-cream”
User Testing
Overall Design of the Questionnaire
Divide the questionnaire into parts.
The first part should deal with initial perceptions and how
alternative designs/approaches.
Following parts should contain questions on the different
identified factors e.g. the storyline, the appeal to human
emotions, the qualities of the characters, the qualities of the set
etc.
A penultimate part should request the reviewer to assign an
order of importance for each factor.
Finally, in the last part, the expert enters his/her personal data
such as their specialisation field, time spent on excavations etc.
Most importantly (s)he is asked to give an opinion on the
completeness of the factor list.
User Testing
Example of Questionnaire
User Testing
Participants
Participants should be recruited taking
into account considerations carefully
depending on what you are trying to
find out:
Experts/Novices
Age groups
Gender
User Testing
Procedure
Before answering the questionnaire, the participants should
have to read an information page that explains:
the format of the questionnaire and how to answer questions.
The background to the artefact that the questionnaire related to.
In the case of a printed questionnaire, this should be verbally
explained.
In the electronic version this should be ensured by having to
specifically tick a box in order to accept that they fully
understood the instructions.
At the end of the questionnaire participants answer questions
about the questionnaire itself such as if they considered the
factor list complete, or if the questionnaire was difficult to fill in.
User Testing
Results
Pie Charts
Distributions
Averages
Standard Deviations
Confidence Intervals
Functional Testing
Typically involves six steps
1. The identification of functions that system is expected to perform from the
functional requirements
2. Create input data based on the function's specifications
3. Determine output based on the function's specifications
4. Execute the test case with test data and then with test equipment (e.g.
robots, sensors and actuators)
5. Compare actual and expected outputs (usually in tabular form)
6. Check whether the application works as per functional requirements
Example of Functional Testing Table
Sub- Functional Responsible Other participants Input Interfaces Output Interfaces Completions Date Status
System Descriptio Task Leader
n
Function Performs a Person A Person B IP Packets 64 byte frames 1st October 2019 Completed
1 particular
task
Function 2 Performs Person B Person C 64 Byte Frames of IP Bytes 4th October Hardware completed
packet data but waiting for software
another
bug to be identified
task
Etc.
Technical Experimental Testing
Aim of the Experiment
Experimental Setup
Experimental Procedure
Presentation of Experimental Results
Analysis of Results
Aim of the Experiment
The aim provides a succinct description of the purpose of your
experiment.
You will be tasked with verifying a defined technical performance
requirement: How fast, how accurate, how long, how straight, how
high, how far etc.
For example:
“The aim of this experiment was to examine how far a robot can throw a ping pong
ball”
Experimental Setup
This section outlines the equipment setup and materials
used while conducting your experiment.
This information is important as it allows for others to
reconstruct your experiment.
You will need to provide:
Diagram of the experimental setup
Enough background that your experiment could be repeated – including
information on: your robot (size weight, height and reach etc.) , what
weight, colour and shape of manipulated objects, what types of pens,
what colours of lines, what type of surfaces etc.
Experimental Procedure
Explain what you had to do to perform your experiment:
Where was your robot positioned?
Where were you manipulated objects positioned?
What commands you provided to your program to perform
experiment?
How many times you repeated the experiment?
Presentation of Experimental Results
This section contains the data you obtained during the experiment.
This data should be presented in a way that makes it easily accessible
to the reader – that is graphically or tabulated where possible.
Repeat the experiment a number of times to obtain sufficient data to
include confidence intervals.
If there are multiple experiments to be conducted then these should
be separated into separate sub-sections to increase readability.
The contents of this section should be observations only; save the
interpretation of your results for the discussion section.
It is important that any statements in this section are clear, concise
and accurate – avoid using vague terms, instead use specific
language to illustrate your results to the reader.
For example, say: “The difference in positioning accuracy between using object A and object B
resulted was less than 1%.”
Rather than: “The difference between the simulation and theoretical results was small.”
Confidence Intervals
This fact is known as the 68-95-99.7 rule, or the empirical rule, or the
3-sigma rule:
About 68% of values drawn from a normal distribution are within one standard
deviation σ away from the mean;
About 95% of the values lie within two standard deviations;
About 99.7% are within three standard deviations.
Normal Distribution Confidence Level z*– value
68.2 1.0
80% 1.28
85% 1.44
90% 1.64
95% 1.96
95.4% 2.0
𝜎 E
98% 2.33
𝐶𝐼=𝜇 ± 𝑧
√𝑛 99% 2.58
𝜎 99.7% 3.0
𝐸=𝑧
√𝑛
http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_Probability/BS704_Probability12.html
http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_Confidence_Intervals/BS704_Confidence_Intervals2.html
http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_Power/BS704_Power2.html
Plotting Results
with Matlab inputmeasurements.xlsx
clc; clear all;
% Input or Independent Variable
x = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
% Output or Dependent Variable
y = xlsread('inputmeasurements.xlsx');
% Calculate mean and Standard Dev
M = mean(y)
S = std(y)
% Select CI by choosing z value
% CI 68%: 2*z*S; z=1;
% CI 95.4%: 2*z*S; z=2 Plot of Target Distance against Actual Distance (CI=95%
120
% CI 99.7%: 2*z*S; z=3
z=2;
% Calculate size of error bar 100
err = 2*z*S/sqrt(10);
% Calculate the margin of error E and the % margin of error
E = (z*S)/sqrt(10); 80
PercentageE= (E./M)*100;
% Plot data with error bars
figure (1) 60
errorbar(x,M,err)
title('Plot of Target Distance against Actual Distance (CI=95%')
40
xlabel('Target Distance')
ylabel('Actual Distance')
% output all your data 20
filename = 'outputdata.xlsx';
xlswrite(filename, [x;y]);
0
0 20 40 60 80 100 120
Target Distance
Analysis of Results
The structure and content of your discussion section depends greatly on the
aim of your experiment; thus, there is no “one size fits all” solution to writing
a discussion section.
Step 1: Link your results to your aim:
In your aim, you outlined what your experiment set out to examine. Are your results consistent
with the aim outlined at the beginning of your report?
Step 2: Describe how successful / unsuccessful was experiment. This should
be supported by quantified results. If your experiment failed, you should
analyse how and where it failed and how it could be improved.
Step 3: Identify any errors or inconsistencies in your results and provide a
rationale or ways to improve the accuracy of your results: What were the
sources of uncertainty or error while conducting your experiment? This can
include things like:
Equipment tolerances
Equipment failure
Measurement errors.
Conclusions and Recommendations
Your conclusion should be used to provide a succinct
overview of the experiment, the results achieved and
whether the experiment was successful.
It may also include any recommendations you have for
further research or refinements to the system design and
the experimental procedure used to obtain your results.
It is important that you do not introduce any new
material in your conclusion that was not discussed in your
report.