I do not believe there is an explicit set of instructions on configuring Eclipse, IntelliJ, or other IDEs since these tools are outside the purview of DevTest.
The major elements to configure in order to resolve references and enable autosense are:
- Ensure that Eclipse (Eclipse Preferences -> Java -> Installed JREs) is running the version of Java that DevTest requires
e.g., If running DevTest 9 or above, make sure you have Java 8 installed and set Eclipse to use the Java 1.8 libraries.
- Create a Project if you do not already have one
- Import the Java code for the custom extension
- For your project, navigate to Project Properties -> Project Build Properties -> Libraries, and add the JAR files found in your LISA_HOME\lib and LISA_HOME\bin, and if necessary, jars found in LISA_HOME\hotdeploy directories. It is unlikely that you need every one of the JARs in LISA_HOME\lib but including them all will not hurt.
If you compile and export the code as a JAR, only export the custom code. Do not export / include classes found in the DevTest software JARs as part of your custom JAR. The DevTest classes are already available in the environment.
If you want to test a DPH, you need to create some sort of test driver class. In the test driver's main method, you can create the basics to send data to the DPH according to what a sample request looks like for your environment.
Some of the things that can be set up in the main method in order to invoke the DPH are:
- Create an instance of TestExec
com.itko.lisa.test.TestExec te = com.itko.lisa.test.TestExec.makeSimpleTestExec();
- Create a VSE Request object
com.itko.lisa.vse.stateful.model.Request req = new com.itko.lisa.vse.stateful.model.Request();
- Create an instance of your custom DPH
YourDph dph = new YourDPH();
- Create some data to place in your request
String someData = "abcdefghijklmnopqrstuvwxyz";
- Set the data into your request body and set any other items in the Request object that need to be there for your DPH
req.setBody( someData );
req.setOperation( "optionalOperationNameHereIfNeededByYourDPH" );
-- set up any other things your DPH needs such as MetaData headers and so on
- call the update request method on your custom DPH
dph.updateRequest( req );
- Alternatively, call the update request method and pass the TestExec and Request objects to the DPH
dph.updateRequest( te, req );
- Get a string value for value that is set back into the body or look at other things on the request
String s = req.getBodyAsString();
Execute the code in the debugger and watch the variables that are important to you