APPENDIX B − TEST CODE FOR DEMONSTRATING GRAPHWALKER

package com.company;

  import org.graphwalker.core.machine.ExecutionContext;

  import org.graphwalker.java.annotation.GraphWalker;

import com.company.TVMtest;

import org.junit.Assert;

//@GraphWalker(value = “weighted_random(edge_coverage(101))”, start = “e_start”)

@GraphWalker(value = “weighted_random(length(500))”, start = “e_start”)

public class TVM extends ExecutionContext implements TVMtest {

   private TicketVendingMachine model;

 @Override

public void Standard() {

  System.out.println(“Running: Standard”);

 }

 

 @Override

public void Zero_ticket() {

  System.out.println(“Running: Zero_ticket”);

 }

 

 @Override

public void Buy(){

  System.out.println(“Running: Buy”);

 }

 

 @Override ...

Get Practical Test Design: Selection of traditional and automated test design techniques now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.