Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
writehandler [2016/09/22 02:36] – external edit 127.0.0.1writehandler [2020/05/10 03:38] (current) – removed admin
Line 1: Line 1:
-===== Writing a Java Handler ===== 
  
-Java Handler is a java class containing a set of methods which are called as models are executed to drive AUT. 
- 
-The easiest way to create the handler class is to let //TestOptimal// generate a skeleton code for you from your model. To do so, go to [[modelnode|Model Property]] and click on "Generate" link next to "Java Class" field. The generated java code (skeleton code) should be displayed as a text file and you can copy and paste the java code into your favorite java editor, see {{http://testoptimal.com/img/VendingMachineHandler.java| example java code generated}}. 
- 
-All you need to do is implement the appropriate methods with the support of plugin specific methods. Refer to the documentation of the plugin driver: 
- 
-  * Abbot - http://abbot.sourceforge.net/doc/overview.shtml 
-  * Jersey - http://jersey.java.net/ 
-  * Selenium - http://www.seleniumhq.org/ 
- 
-We recommend that you use [[http://www.eclipse.org|Eclipse]] or [[http://www.netbeans.com|NetBeans]] to debug and test your java handler. //TestOptimal// can be [[EclipseIntegration|integrated with Eclipse]] and [[NetBeansIntegration|integrated with NetBeans]] very easily. The java class should be stored at /script/ folder. Please note that if you put your java handler in a package, the java file must be placed in the subfolder under /script/ that reflects the pakage path.