You are on page 1of 5

ABSTRACT Embedded systems can be engineered using Clean Room Software Engineering methodology (CRSE) as it considers all the

quality issues and lays stress on the reduced size and effort of testing through statistical use testing. In the process of generating test cases, the state diagram (usage model) of the embedded system (Nuclear Reactor Model) is made. Then it is represented in graph matrix (pictorial representation) with size equal to no. of states in the usage model. The different state transitions, represented in the graph matrix are given equal probabilities accordingly called Marchov Chains. The Marchov chains is then converted into a revised form by applying Safety Criticality. In the revised form of graph matrix for which Safety Criticality is applied, high value is assigned for the heavily occurring transitions and less value for frequently occurring transitions. Our mini project is to generate test cases randomly to test the critical transitions in the Nuclear Reactor Model represented in the graph matrix. This is done using genetic algorithms. The test suit that is generated contains various test cases to test the working condition of the Nuclear Reactor Model. Various temperatures are generated, compared with the respective reference temperatures and the expected values of the status of various pumps and buzzers are given as the output for the benefit of testers to test the system thoroughly with minimal effort. Genetic algorithms are a search techniques used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms (EA) that use techniques inspired by evolutionary biology such as mutation, selection, and crossover. Genetic algorithms are one of the best ways to solve a problem for which little is known. They are a very general algorithm and so will work well in any search space. All you need to know is what you need the solution to be able to do well, and a genetic algorithm will be able to create a high quality solution. Genetic algorithms use the principles of selection and evolution to produce several solutions to a given problem. Finally, the scope of our mini project is automatic generation of test cases to test an embedded system (Nuclear Reactor Model) using Genetic Algorithms.

INTRODUCTION TMCNRS (Temperature Monitoring and Controlling of a Nuclear Reactor System) is the system under test for which ATCG (Automatic Test Case Generator) generates a test suite. The hardware integration diagram of TMCNRS is shown in Fig below. The temperature sensors are connected to signal conditioners and the output of signal conditioners are connected to A/D converter which communicates with Micro Controller using I2C Communication protocol. The output devices are connected to the Micro Controller through its output ports. The Relays connected to the pumps are connected to the I/O pins of the Micro Controller. The Micro Controller is also connected to the PC (HOST) using RS232C interface. The sensors are mounted on the water tube situated in the mechanical setup. Flow control is achieved through activation and deactivation of the relays that control the Start-stop mechanism of the pumps. The pumps are part of the mechanical setup whereas the relays are part of the embedded system. The relays are fed with input power and the output power of the relay is connected to the pumps by drawing the power lines. Buzzers are connected to Micro Controller. LCD display is connected to the Micro controller. A key board is connected to the Micro Controller through A/D converter and the Data from Key board is read in I2C communication.
Power supply Key-C Key-8 Key-4 Key-0 Key-D Key-9 Key-5 Key-1 Key-E Key-A Key-6 Key-2 Key-F Key-B Relay -1 Key-7 Key-3 Relay -4 LCD Display Buzzer -1

Pump-1

. .
89c51 Micro Controller

. . .

Pump-4

I2C Communication A/D Converter

. .
Buzzer-3

RS232C
Temp -1 Signal Conditioner

. . . .

Temp -4 Signal Conditioner

RS232C

S1

S4

The embedded system, nuclear reactor prototype to be tested consists of a number of sensors and each sensor is connected to a pump that controls the temperature of the system. Each sensor contains a reference temperature, maximum temperature a sensor must detect. If the sensor temperature is greater than the reference temperature, then the respective pump should be on and cools the system. If the sensor temperature is less than the reference temperature, then the pump should be off. To ensure that a whole mechanism is working properly this embedded system is to be tested. Exhaustive testing of the embedded systems in the critical regions is important as the embedded systems must be basically fail safe systems. The Critical regions of the input space of the embedded systems can be pre-identified and supplied as seeds. The project is to develop an Automatic Test Case Generator (ATCG) that uses Genetic algorithms (GAs) to automate the generation of test cases from input domain.

FEASIBILITY OF COMBINATIRIAL TESTING A commonly cited rule of thumb among test managers is that testing accounts for half the budget of a typical complex commercial software project. But testing isnt just expensive, its arbitrarily expensive. Thats because there are more distinct imaginable test cases for even a simple software product that is used in the natural lifetime of any tester. Pragmatic software testing, therefore, requires that we take shortcuts that keep costs down. Each shortcut has its pitfalls. We absolutely need shortcuts. But we also need to choose them and manage them wisely. Contrary to the fondest wishes of management, there are no pat formulas that dictate the best course of testing. In testing software, there are no "best practices" that we simply must "follow" in order to achieve success. Take Domain Partitioning(DP) as an example. In this technique, the tester divides test or test conditions into different sets wherein each member of each set is more or less equivalent to any other member of the same set for the purposes of discovering defects. These are called equivalence classes. For example, in a nuclear reactor with two sensors (ref. temps: 30 and 32) and their respective pipes, the two possible outcomes would be pump on condition and pump off condition. According to domain partitioning, test cases that test these two conditions are enough to ensure the reliability of the system i.e., only two test cases: [25, 33] [27, 35] But it fails in the following case: If the code is: If(temp1<30) //pump1 off Else //pupm1 on In this case pump1 is activated if the sensor temperature is exactly equal to 30, but the pump should be de-activated if it is 30. With the DP this fault cannot be detected. So Domain Partitioning alone is not enough to ensure the systems reliability. Along with Domain Partitioning, Boundary Value Analysis (BVA) has to done.

In Boundary Value Analysis (BVA), it creates test cases around the boundaries of the valid data. The values that can be passed are exact boundary values, +/- lowest boundary value and +/- highest boundary value. For example, in a nuclear reactor having two sensors with possible values from 0 to 100 (inclusive) and reference temperatures 30 and 32 respectively, the input domain must contain boundary values. Then the test cases would be: For temp1: [0],[1],[2],[29],[30],[31],[99],[100]. For temp2:[ 0],[1],[2],[31],[32],[33],[99],[100]. This would fail in the following case: If the code is: If (temp1<=30) //pump1 on Else { if (temp1==40) //pump1 off //pump1 on } In the above case the pump should be activated if the temperature is equal to 40. But here the pump is being de-activated. These kind of faults cannot be determined by either DP (Domain Partitioning) or BVA (Boundary Value Analysis) or both. In order to find these kind of faults Single Mode Testing is required. Single Mode testing of the nuclear reactor ensures that the

You might also like