Created On:  06 November 2012

Problem:

Getting the following java exception when converting a Manual Test to an automated SilkTest Workbench Test.

ERROR  

java.lang.ArrayIndexOutOfBoundsException: 1
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.testdefinitiontypes.silktest.SilkTestWorkbenchDataStore$SilkTestWBDataHelper.(SilkTestWorkbenchDataStore.java:170)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.testdefinitiontypes.silktest.SilkTestWorkbenchDataStore.(SilkTestWorkbenchDataStore.java:44)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.testdefinitiontypes.silktest.SilkTestWorkbenchScriptPropertyEditor.getGrid(SilkTestWorkbenchScriptPropertyEditor.java:96)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.testdefinitiontypes.silktest.SilkTestWorkbenchScriptPropertyEditor.getEditor(SilkTestWorkbenchScriptPropertyEditor.java:53)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.ui.dlgs.EditPropertiesDialog.updatePropertiesContainer(EditPropertiesDialog.java:358)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.ui.dlgs.EditPropertiesDialog.switchToPage(EditPropertiesDialog.java:408)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.ui.dlgs.EditPropertiesDialog.createContent(EditPropertiesDialog.java:229)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.ui.dlgs.EditPropertiesDialog.(EditPropertiesDialog.java:151)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.ui.dlgs.EditPropertiesDialog.(EditPropertiesDialog.java:182)
 at com.segue.tm.frontendserver.planning.testdefinitionplugin.ui.dlgs.EditPropertiesDialog.(EditPropertiesDialog.java:187)
 at com.segue.tm.frontendserver.ui.planning.actions.AutomateTestDefinitionAction.run(AutomateTestDefinitionAction.java:112)
 at com.borland.bca.webgui.ui.components.menu.ContextMenu$1.requestPerformed(ContextMenu.java:160)
 at com.borland.bca.webgui.internal.html.internal.RequestDispatcher.invokeRequestListenersOfComponent(RequestDispatcher.java:122)
 at com.segue.scc.webgui.component.HtmlServletPage.dispatchRequest(HtmlServletPage.java:479)
 at com.segue.scc.webgui.component.HtmlServletPage.display(HtmlServletPage.java:578)
 at com.segue.scc.webgui.SccUser.handleRequest(SccUser.java:453)
 at com.segue.scc.webgui.SccFrontendMainServlet.handleUserRequest(SccFrontendMainServlet.java:126)
 at com.borland.bca.webgui.core.BcaServlet.dispatchUser(BcaServlet.java:143)
 at com.borland.bca.webgui.core.BcaServlet.doGet(BcaServlet.java:73)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at com.borland.bca.webgui.core.EncodingFilter.doFilter(EncodingFilter.java:22)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

Resolution:

Ensure that the sourcecontrol specified for the test container of the test is a SilkTest Workbench sourcecontrol.  Changing the sourcecontrol to a SilkTest Workbench sourcecontrol will resolve the exception.