phmLabs / LiveTest2

LiveTest2
MIT License
5 stars 9 forks source link

Add return codes if tests are failing #46

Open sebastianneubert opened 9 years ago

sebastianneubert commented 9 years ago

If livetest is started via ANT or Bash, it still thinks everything works fine because it get a successful return code. That could be confusing, if tasks are depending on this livetest task.

A correct return code should work to get the correct behavior.

livetest:
     [exec]
     [exec] LiveTest2 (2.2)
     [exec]
     [exec]   Default Domain  : http://qm.ci.guj.de
     [exec]   Start Time      : 2015-03-16 20:20:20
     [exec]   Number of URIs  : 1
     [exec]   Number of Tests : 5
     [exec]
     [exec]   Running: ***f*
     [exec]
     [exec]      Result Statuses:
     [exec]
     [exec]      Url         :  http://qm.ci.guj.de/
     [exec]      Test        :  impressumPresent
     [exec]      Test Class  :  LiveTest\TestCase\General\Html\TextPresent
     [exec]      Session     :  indexPages
     [exec]      Status      :  Failed
     [exec]      Message     :  The given text "Impressum" was not found.
     [exec]      FailOnError :  false
     [exec]
     [exec]   Tests: 5 (failed: 1, error: 0) - Duration: 0 second(s)

BUILD SUCCESSFUL
Total time: 2 seconds