Abstract:
In software testing based on Markov chain usage model, the sequence of state and stimulus from state”Start”to state”Exit” is a complete test case. Therefore, test input, stimulus, is very important to generate effective test case. Focusing on this, a method for selecting stimulus is proposed in the paper, called a random selection algorithm with probability constrained. This method uses the migrating probability between states of Markov chain usage model as constraints, selects stimulus by roulette selection operator, and then gets the next state. Roulette selection operator is used in genetic algorithm to select next generation of species. In this paper, it is used to select stimulus at every state. Compared with the previous selection method, random selection algorithm with probability constrained can improve the effectiveness of test cases.