State-based Testing

Generate a state machine

  1. Create a txt file and write code
  2. Change the suffix .txt into .sm
  3. Download SMC
  4. Command Line: java -jar Smc.jar -java Seminar.sm, a new java file ‘SeminarContext.java’ created
  5. Command Line: java -jar Smc.jar -graph Seminar.sm, a new dot file ‘Seminar_sm.dot’ created
  6. Download Graphviz and do configuration
  7. Command Line: dot -Tpng Seminar_sm.dot -o Seminar.png, a new png file ‘Seminar.png’ created