Software Testing: Practical 2

This page describes the second and final practical for the Informatics Software Testing course. This practical is worth 12.5% of the assessment of the course. It should take approximately 20 hours of work to complete. This practical will be marked out of 100 points (approximate weights will be provided for each task in the practical).

Deadline

This practical was issued on Wednesday 3rd February. The submission deadline for the practical is Thursday 18th March at 16:00. 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.

Background

In this practical you will consider the integration testing of components and the system level testing of an educational software system that is reasonably mature and has been developed for use by students. The system is called VMAP (follow this link for an intro) and is intended to help users create “mindmaps”. For more explanation of what the system does see the introduction and help on the web page. There is also a link on the VMAP page that allows you to run VMAP from your web browser. The same notes as in Practical 1 regarding a minor incompatibility with Java 1.5 apply.

Resources

The system is open source and all of the source is available in a range of formats from the project page. In addition the source code is available locally as a tar file compressed using bzip2 (extract with tar xjf vmap-0.91.tar.bz2).

Tools

You will probably need the following tools. You can choose either to use the Eclipse IDE or just to use JUnit on its own — I have no strong preference. Bear in mind though that the version of Ant installed on DICE is incompatible with JUnit 4, so if you use JUnit on its own and you intend to use Ant as your build tool, work with JUnit 3. You will need some of the following:

  1. If necessary you can download JUnit from here. If you are using Eclipse it is probably already installed in the IDE. This article is a reasonable introduction to using JUnit with Eclipse, but bear in mind its age: in particular it's focussed on JUnit 3. Here's a good introduction to JUnit 4 (free registration required).
  2. You will need some kind of coverage analysis tool.
    • With a more recent version of Eclipse you can use EclEmma. It's easy to install through Eclipse's built in software update mechanism.
    • If you are using version 3.2 or earlier of Eclipse (the version installed on DICE is 3.4), then Coverlipse provides a very simple coverage analyser within Eclipse. The latest release of Coverlipse claims to be compatible with Eclipse 3.4, but I've heard of people having a bit of trouble with it.
    • For stand-alone coverage you should consider something like jcoverage or Cobertura.

Now you should work through the following activities:

Task 0: Review (1 hr, no credit)

Go back to the VMAP web page and remind yourself what it is intended to do. Since this practical is more concerned with system testing it is more important to know what the system is capable of doing.

Deliverables: None.

Task 1: Integration Testing and Coupling-based Coverage (5 hours, 25 marks)

In this section you will assess the effort required to test the integration of a relatively modest system. Assessing the integration of a system like VMAP can be very time consuming. To limit the task you will consider integration testing for some classes in the top level packages: vmap.main and vmap.controller. You should do the following tasks:

  1. Construct a test suite, using JUnit, comprising at most 20 tests for the Vmap class. The test suite should be directed to testing as many method calls as possible in the Vmap class. Use EclEmma or another coverage tool to check the level of statement coverage of your test suite.

    Note that here you're testing straight from JUnit and focusing on broad API coverage, without reference to a test case specification or the Category-Partition method. If you decide not to test some methods, give a very brief outline of your reason(s).

  2. Inspect the code for the classes Vmap, Tools and Controller and the coverage attained by your test suite. Write a short report (around 500 words) that:
    • Identifies the main ways in which these three classes are coupled. For example, what methods are called, are there shared variables, …
    • Discusses what would be necessary in a test suite to achieve full statement coverage of the code in these three classes.
    • Outlines what would be necessary to meet the coupling-based coverage criteria.

Deliverables: The deliverables from the tasks of this section are:

  1. Your test suite for Vmap, in a file called Task1.java. The class should use the default package (i.e. no package).
  2. A section in your report documenting your tests and including your report on coupling. Regarding the tests, while you're not working through as detailed a process as in Practical 1, you should identify any important choices or assumptions you made while creating these tests, and discuss your test results.

Task 2: Using Coupling-based Coverage (5 hours, 25 marks)

For this section just consider the method openDocument in the Vmap class and the use of the parameter url. You should do the following:

  1. Identify all the last defs and first uses of url, concentrating on coupling between the Vmap and Tools classes.

    Note that in the tutorial we look at coupling through return values as well; that's not necessary here.

  2. Work out the coupling paths that must be followed if the test is to conform to the all-coupling-uses coverage criterion.
  3. Develop a test suite for the method that exercises all the coupling paths that you have identified. If for some reason you fail to meet the criterion provide a short explanation why you cannot conform to it in your report.

Deliverables: The deliverables from the tasks of this section are:

  1. A section in your report annotating the source of the relevant methods with first use and last defs for the variable url and identifying the coupling paths.
  2. Your test suite for Vmap.openDocument, in a file called Task2.java. The class should use the default package (i.e. no package).
  3. An explanation in your report — if it is necessary — detailing why the coupling-based coverage cannot be met.

Task 3: System Testing (3 hours, 15 marks)

Re-read the lecture slides that list some of the varieties of testing you might apply during system testing. Select the three different kinds of system test you consider most appropriate for VMAP. Investigate the best approaches to carrying out these tests on the VMAP system.

Deliverables: A short (500-1000 words) section in your report detailing your choice of the three most appropriate system testing activities, together with a justification for this choice. For each of the chosen system testing activities, provide a brief outline of how you would go about such testing for the VMAP system. Try to be reasonably specific, providing examples of test input and identifying what they are intended to test.

Task 4: GUI Testing (6 hours, 35 marks)

One important aspect of system testing for VMAP is the testing of the GUI used to develop the mind maps. Prepare to answer this question by reading Coverage Criteria for GUI Testing and some more pragmatic advice on the use of the Abbot tool in GUI testing. You might also find this checklist useful. For this task, you should prepare a short report (800-1000 words) outlining the key elements in the VMAP GUI that require test and for each of these elements you should outline how you would test that element. A description of the approach should include the description of any necessary scaffolding code, the kind of test to be applied and the expected result.

Note that you are not being asked to carry out this testing work. Your deliverable is a report outlining the testing that is needed for the VMAP GUI.

Deliverables: A section in your report outlining how to go about testing the GUI provided in VMAP.

Submission of the Practical Work

After completing the practical you should have three files. It will help me with marking if you please exactly adhere to these names (including upper/lower case):

report.pdf
All of your documentation for this practical, with the material for each task clearly identified (e.g. Task 1 material in a section titled “Task 1”, Task 2 material in a section titled “Task 2”, and so on). If you cannot produce PDF, contact me for advice: I can cope with a number of other formats but (for example) don't have access to the most recent version of Microsoft Office.
Task1.java
Your tests for Task 1.
Task2.java
Your tests for Task 2.

To submit your work you should collect the material you wish to submit, and execute this command (for example):

submit cs3 st cw2 report.pdf Task1.java Task2.java

Questions

Some of your questions regarding this practical may be answered in this discussion of some of the issues in practical 2.


Version 1.4, 2010/02/24 14:39:30


Home : Teaching : Courses : St : 2009-2010 

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