This page describes the practical for the Informatics Software Testing course. It will be marked out of 100 points, and is worth 25% of the assessment of the course. This practical will be undertaken in groups, normally of three to four, and will be assessed on a group report and individual submissions. This practical should take approximately 20 hours of work from each participant to complete. If at any time you believe you are likely to exceed this estimate by more than 30% please get in touch with the TA or me to discuss what can be done.
You will have an opportunity to get formative feedback on your practical work. If you submit a draft to me by email on or before Mon 29th February I will provide feedback on the submission by Friday 11th March. This process will not involve formal assessment and there is no credit allocated to the draft submission. However, it is an opportunity for you to improve your submission prior to the coursework deadline.
The penalty for late submission follows the uniform policy described in the UG3 course guide. Please read that page, and pay particular attention to the section on plagiarism.
For this practical you will be split up, where possible, in groups of 3 or 4. You should already have recieved or will shortly receive notification of the members of your group. There are 4 tasks of which the first three will be done as a group and the last one individually.
Each of the first three tasks will count 25% of the final assessment (so the group activity counts 75% of the assessment) and the individual task will count 25% so each member of the group will be allocated the group score on the group tasks plus their score on the individual task.
The overall goal of this project is to produce a short report on the testing of a small program. The report should be at most around 20 pages in length, supported by various other technical deliverables (code for tests). It should be split up into a main body and appendices (the number of pages being counted in the total of 20). The main body of the report should consist of sections with the results of the group and individual tasks. You should clearly label each individual section with the author's student number so marks can be allocated to the correct individual. The appendices should include numbered screenshots, figures (e.g. a control flow graph) and any small piece of code you would like to refer to from the explanations, and should constitute visual aids to your explanations from the main body of the report. Appendices should be referred to and explained from the main body of the report - any which are not will not be counted towards your final assessment.
You should be able to complete the tasks described below with around 15-20 hours of effort per group member so each group has a "budget" of 60-80 hours of effort depending on the size of group and your choice. You should consciously manage that effort. If you find your group has an individual who is not contributing effectively you can raise any concerns with me and I will take it up with the individual concerned.
In this practical you will consider the Java program, StringUtils.java, and Specification.
You can choose either to use the Eclipse IDE or just to use JUnit and other tools standalone; I have no strong preference - many people find the tools available in Eclipse useful (if you haven't used Eclipse before maybe now is the time to give it a try). You will need some of the following:
Each of the group tasks has an associated tutorial which will help you prepare for it. Please prepare in advance for the tutorial to get the most out of it.
Now you should work through the following activities:
Preparation: If you don't have Eclipse installed and want to use it, you should downlaod it and install it. You can find Eclipse here. Once you have installed Eclipse, you should look at the tutorial. Do enough of the "getting started" tutorial that you have JUnit as a project in Eclipse. You should also install eclemma if you don't have it and intend to use it. You can delay this since it is not essential for the first task.
You should spend some time looking at the JUnit project in Eclipse and become familiar with its structure.
You should also thoroughly read and understand the provided specification and create a plan with the group in addressing the different tasks.
Preparation: You should thoroughly read and understand section 11.2 of Pezze and Young and the defining paper on the Category Partition method by Ostrand and Balcer, and do tutorial 1.
In this task you will generate a test suite in JUnit by first
constructing test case specifications using the category partition
approach. In this task you will test the method
String replaceString(String inputText, String pattern, String replacement, Character delimiter, boolean inside)
that can be found in StringUtils.java. You should document the
following parts of the process:
You should then implement your test case specification and test the code for the function. In giving a grade for this part of the practical I will take account of the performance of your test set on a collection of variants of the method.
Deliverables:
Task1.java
that contains your JUnit tests.
Preparation: You should read Pezze and Young chapter 12 and then do tutorial 2 on this topic.
Using some appropriate coverage tool (please specify which), assess the level of branch coverage achieved by your test suite developed in Task 1. Then do the following:
Deliverables:
Task2.java
containing any new tests.
Preparation: Read Pezze and Young Chapter 10 on Adequacy and then do tutorial 3 which covers mutation. This should help to decide how to generate mutants.
In this section you should consider using mutations to check the adequacy of your test set developed under Task 1. You should do the following:
replaceString
method.
Deliverables:
StringUtils.java
, call the variant files StringUtils1.java
, StringUtils2.java
, and so on.
Task1-strong.java
or something similar.
Preparation: Read Pezze and Young Chapter 22 (Section 5) on Regression Testing.
The user has changed his/her mind about what the replaceString method should accomplish. The user has decided that the replaceString method should only replace all occurences of the pattern in the first matched region, and not all matched regions. You are provided with an updated version of the specification, Spec2 , and code StringUtils2.java for this change. In this task, you should do the following,
StringUtils.java
and StringUtils2.java
will reveal the added/changed code.
Use EclEmma to measure branch coverage using these tests. After running the tests with EclEmma, attach a screenshot
with the results that highlight the code covered as green and the uncovered code as red and partially covered in yellow.
The highlighted code that needs to be shown is only the added/changed code in StringUtils2.java from the original version that has branches.
Please do not submit the highlighted code for the full Java program.
Deliverables:
Task4-yourUUN.java
, eg. Task4-s1234567.java, containing regression tests for StringUtils2.java.
Task4-strong-yourUUN.java
,
with the augmented tests that help achieve full branch coverage of the updated code.
After completing the practical you should have the main report and additional files of tests etc. It will help me with marking if you please exactly adhere to these names. For other sections if you submit additional files use the naming convention: Taskn-XXX.ttt where $n$ is the task number the file relates to and XXX.ttt is a descriptive name and file extension. (including upper/lower case):
To submit your work you should designate one member of the group as a submitter for the group. The report should be clearly labeled with your group number. The submitter will gather together the files you wish to submit, and execute this command (if for any reason you have not produced one of the listed files you should omit it from the submit command). The dots at the end of the command signify all the other relevant files:
submit st 1 report.pdf Task1.java Task2.java ...
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk Please contact our webadmin with any comments or corrections. Logging and Cookies Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh |