regarding how to stop suite when a test fail

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

regarding how to stop suite when a test fail

FitNesse mailing list
Hi,

I’m working on a project with fitNesse integrated withselenium and java. I want to know how can I create a method in java andselenium which will allow me to stop a fitNesse suite when there is an error. Ican add this method to my catch exception in click, sendkeys, etc. I need it assoon as possible.


 
Thank You

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: regarding how to stop suite when a test fail

FitNesse mailing list
LOL...it seems we all want our information "as soon as possible."  ;-)

 At the link below, look at the last section titled, Stopping the execution of the test:
 

 Link:  http://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ExceptionHandling http://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ExceptionHandling
 
 May your code always be Slim,
 Andy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: regarding how to stop suite when a test fail

FitNesse mailing list
Hi, Thank you but that information is not clear as to how i would create a class for stoptest and call it on fitNesse. I need an example.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: regarding how to stop suite when a test fail

FitNesse mailing list
Below is an example.  I also recommend you study the Java language core features in more depth, so you have a better understanding of exception handling.

 -------- MyFixture.java:
 package org.mycompany.fitnesse.fixtures;
 

 public class MyFixture {
 

     public int testPowerOfThree (final int value) throws Exception {
         if (value > 100)
             throw new MyFixtureStopTestException();
 

         return value * value * value;
     }
 

     public class MyFixtureStopTestException extends Exception {
         private static final long serialVersionUID = 1L;
     }
 }
 --------

 


Loading...