Feature Testing

3. Feature Testing

The following features of the program are tested: • Read Data from files: The program reads a line at a time as a string from

the input file and parses the string and then applies the string functions to convert into an integer or a double. So it is very important that the form at is exactly as expected by the parser. The program throws appropriate the input file and parses the string and then applies the string functions to convert into an integer or a double. So it is very important that the form at is exactly as expected by the parser. The program throws appropriate

• Read program arguments: The program has two arguments, 1) The number of threads which can be 1, 2, 4 or 8 for a small system and 1,2,4,8 or 16 for a large system. The limit is 8 and 16, since the number of partitions in one direction is 8 for a small system and 16 for a large system. 2) An integer which specifies what system to simulate, 0 for small system and 1 for a large system. The program has to catch exceptions and throw an error, if the program has an incorrect number of arguments, or invalid arguments. The table at the end of this section lists the test cases where this feature of the program is tested.

• Formatting values for output: The program outputs the total energy, potential energy, kinetic energy and the temperatures at each step in a fixed format i.e. each of these fields are printed with a fixed spacing between them. If the length of one of the fields is larger than the spacing, an exception should be thrown. This in a way also indicates that the values are incorrectly calculated by the program, since usually the lengths of the fields fall within the space allocated for them. As a test case, the forces of each of the atoms are not initialized in the force () method of the program. So, the values of the potential energy and kinetic energy keep increasing until they are no longer small to be printed out in the desired format. This test case is shown in the following table.

The following table describes the test cases and the results:

Result Read Data from files

Test Unit

Test Case

md.dat input file with line 9 Error : Line 9 in the file in incorrect format

md.dat is not in the format expected.

Read Data from files vel.in input file with line 38 Error : Line 38in the file in incorrect format

vel.in is not in the format expected.

Read Data from files init_positions input file Error : Line 256 in the file with line 256 in incorrect init_positions is not in the format

format expected. Format values for output

Forces are not initialized.

Error: The values of the fields are too large to be printed.

Read program arguments

java mdpar/MdPar

Usage: java mdpar/MdPar arg1 arg2 where

arg1: number of threads = 1,2,4 or 8 for a small system

= 1,2,4,8 or 16 for large system

arg2: system identifier = 0 for small system = 1 for large system

Read Program arguments

java mdpar/MdPar 16 0

Error: Incorrect number of threads for the system chosen Usage: java mdpar/MdPar arg1 arg2 where

arg1: number of threads = 1,2,4 or 8 for a small system

= 1,2,4,8 or 16 for large system

arg2: system identifier = 0 for small system = 1 for large system

Read Program Arguments

Java mdpar/MdPar 4 3

Error: Incorrect choice for system identifier Usage : java mdpar/MdPar Error: Incorrect choice for system identifier Usage : java mdpar/MdPar

arg1: number of threads = 1,2,4 or 8 for a small system

= 1,2,4,8 or 16 for large system

arg2: system identifier = 0 for small system = 1 for large system

Table 7: Test Cases and Results

Dokumen yang terkait

Analisis Komparasi Internet Financial Local Government Reporting Pada Website Resmi Kabupaten dan Kota di Jawa Timur The Comparison Analysis of Internet Financial Local Government Reporting on Official Website of Regency and City in East Java

19 819 7

Analisis Komposisi Struktur Modal Pada PT Bank Syariah Mandiri (The Analysis of Capital Structure Composition at PT Bank Syariah Mandiri)

23 288 6

Improving the Eighth Year Students' Tense Achievement and Active Participation by Giving Positive Reinforcement at SMPN 1 Silo in the 2013/2014 Academic Year

7 202 3

An Analysis of illocutionary acts in Sherlock Holmes movie

27 148 96

Improping student's reading comprehension of descriptive text through textual teaching and learning (CTL)

8 140 133

Teaching speaking through the role play (an experiment study at the second grade of MTS al-Sa'adah Pd. Aren)

6 122 55

Enriching students vocabulary by using word cards ( a classroom action research at second grade of marketing program class XI.2 SMK Nusantara, Ciputat South Tangerang

12 142 101

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

Analysis On Students'Structure Competence In Complex Sentences : A Case Study at 2nd Year class of SMU TRIGUNA

8 98 53

The correlation between listening skill and pronunciation accuracy : a case study in the firt year of smk vocation higt school pupita bangsa ciputat school year 2005-2006

9 128 37