IBM Support

IBM DevOps Test Performance CustomCode Requires External Jars for Java 17

Troubleshooting


Problem

Custom code provided to or developed by customers for use with test scripts is developed for a specific point in time along the Java lifecycle. As Java moves forward, the custom code is subject to changes in Java itself.

An example came to light recently. Custom code was written to use the nashorn script engine to run JavaScript. 

For e.g.,:

 // Create the JS Engine 

   ScriptEngineManager manager = new ScriptEngineManager();

   ScriptEngine engine = manager.getEngineByName("javascript");
   …
   for (String libFile : libFiles){

     FileReader libFileReader;

     try {

       libFileReader = new FileReader(libFile);

       engine.eval(libFileReader);

     } catch (FileNotFoundException e) {

       tlm.reportMessage("message 1");

       return null;

     } catch (ScriptException se) {

       tlm.reportMessage("message 2");

       return null;

     }

When run with IBM DevOps Test Performance (Test Performance) v11.0.4, a NullPointerException will occur because the engine value is set to null.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSE8AUA","label":"IBM DevOps Test Performance"},"ARM Category":[{"code":"a8m0z000000brD2AAI","label":"Performance Tester-\u003ECustom code"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0.2;11.0.3;11.0.4;11.0.5"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
04 June 2025

UID

ibm17235630