1. ## generate test cases

Hi, I'm fairly horrible in c++ so I've come here to ask for help. I'm required to implement Adaptive Random Testing (ART) to generate test cases in a simulated program. The program needs to be in C++. I've tried searching for tutorials online or even books from my library but was not able to find one that can help me. Can anyone help me how to get started or know any tutorials online that I can refer to coz I really need help and I'm not sure how to get started.

2. That's really vague. What kind of system or program are you testing?

DISCLAIMER - I don't know anything about ART.

In general the idea of a simulation is to generate a bunch of random conditions over and over. In C++, that means you need to use rand() (or some other random number generator) and loops.

It's easier to test a banking program with 10,000 simulated customers than with 10,000 people sitting at keyboards.

As I understand it - With ART, you try to bias the randomness near the limits and worst-case conditions. With this technique, you are more likely to find a fault or weakness than with purely random testing. That might require filtering the random numbers through a statistical-distribution filter... i.e. create a "normal distribution" curve.

In a banking simulation, you might want to bias the simulation with lots of situations when many users are simultaneously withdrawing lots of money. Or, when a husband and wife at two different branches are trying to withdraw money from a joint account at the same time, etc.

3. Here is the full question to understand better:

The simulated program should cover functions in the following pseudo code:
(1) Define the input domain D1.
(2) Repeatedly implement Steps 3 to 6 for 2000 times.
(3) Randomly2 select a subdomain Di from D.
(4) Use ART to generate test cases from D until a point inside Di is selected.
(5) Record the total number ni of test cases generated so far.
(6) Calculate the average value of all ni. (This is your experimental F-measure.)

The parameters for the simulated program are restricted as follows:
(i) The number of dimension of D: 3, i.e., there are three axes, x, y, and z;
(ii) The shape of D: cube, i.e., |zmax – zmin| = |ymax – ymin| = |xmax – xmin|;
(iii) The type of coordinates of D: real number;
(iv) The shape of Di: cube;
(v) The failure rate θ (= Di / D): 0.01 and 0.005.That means you MUST run the simulation program TWICE.

So that means its just a random number generator that I need to do? DougDbug do u or anyone else knows any sites with tutorials of random number generator that can help me get started?

4. Originally Posted by lisa18
DougDbug do u or anyone else knows any sites with tutorials of random number generator that can help me get started?
http://eternallyconfuzzled.com/tuts/random.html