WDK Automated Test Framework - javascript error

Options
mingus
edited September 22, 2008 in Documentum #1

Hello,

I am getting this error when testing some scenarios using the WDK Automated Test Framework.

I'm quite new to WDK, any suggestions on how to solve it ?

Thanks !

error

-


case:[case: testcase1]

-


cause: A javascript error occurred while running the test case: Line ??? of http://vm1sm:8080/webtop/webtop/classic/homecabinet/homecabinet_classic.jsp resulted in 'Failed to retrieve control HomeCabinetClassicView_namecolumnbeginswith_0'::Line 1 of http://vm1sm:8080/webtop/webtop/classic/homecabinet/homecabinet_classic.jsp resulted in ''controlByName_0' is null or not an object'::; test step: Step9_ExecuteNewdocumenttypeAction

reason:

path: /adhoc testsuite:ticket=5/testcase:id=testcase1

time (START): 18-Sep-2008 12:09:42 - time (END): 18-Sep-2008 12:09:58

time (ELAPSED): 0:0:16.578

Stack Trace

com.documentum.web.test.CreateJavascriptErrorActionHandler.service(CreateJavascriptErrorActionHandler.java:69)

com.documentum.web.test.TestCaseDriver.serviceRequest(TestCaseDriver.java:131)

com.documentum.web.test.servlet.TestCaseDriverServlet.setUp(TestCaseDriverServlet.java:101)

com.documentum.web.test.servlet.TestCaseDriverServlet.doGet(TestCaseDriverServlet.java:58)

javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

com.documentum.web.servlet.CompressionFilter.doFilter(CompressionFilter.java:108)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

com.documentum.web.env.WDKController.processRequest(WDKController.java:95)

com.documentum.web.env.WDKController.doFilter(WDKController.java:83)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)

java.lang.Thread.run(Thread.java:595)

Comments

  • wongm2
    edited September 18, 2008 #2
    Options

    Hi,

    If you did not put in any values in the beginswith filter during recording, then If you can comment out the line with a SetValueEvent that operates on "namecolumnbeginswith" in your testcase java file and recompile it should solve the problem for now.

    Also, if you can attach the test case, I can have a look at why it happens.

    Thanks

    Matthew

  • ljwong
    edited September 18, 2008 #3
    Options

    Hi,

    It would also be helpful to know if you used the same version of the framework and WDK/Webtop to record the test as you did to playback the test and what version of the product that was. If I remember correctly, that was one of the controls that got added/changed/removed between different Webtop versions.

    Linda

  • mingus
    edited September 18, 2008 #4
    Options

    Hello !

    Linda, I am using D6 SP1 and WDK AFT 2.0. I guess this should be ok, no?

    I tried changing and recompiling the code generated by the recorder in different ways, but didn't manage to end the test with success.

    I also tried to change the testframework_config.xml file, adding the control type "com.documentum.web.form.control.databound.filter.DataColumnBeginsWith" into the <ignoreablecontroltypes> section, but didn't change anything neither. I was expecting the event to be ignored if it's included there.

    Finally, just removed the "datacolumnbeginswith" control from the jsp which contained it, doclist_body.jsp :

    <dmf:datacolumnbeginswith name='namecolumnbeginswith' column='object_name' ...

    I know it's not brilliant but the testcase goes through now, and should be ok to test a couple of things.

    If I find out anything else I'll post it.

    Thanks for the replies

    Saul

  • wongm2
    edited September 18, 2008 #5
    Options

    Oh I think that's an issue that got fixed in the 2.5 version, but apparently 2.5 is for 6.5, so I'll have to discuss with the relevant people regarding whether to backport the changes.

    But I think it should be possible to remark the SetValueEvent that fired the event on the namecolumnbeginswith control. That would be the best way to work around the issue for now.

    Matthew

  • ljwong
    edited September 19, 2008 #6
    Options

    Hi Saul,

    Yes, Webtop D6 SP1 and ATF 2.0 are compatible with each other.

    As Matthew stated, it should be possible to comment out the line that has the SetValueEvent line which attempts to manipulate the "namecolumnbeginswith" control. Based on the call stack you provided, this would be within the getClientEvents method of the Step9_ExecuteNewdocumenttypeAction inner class in your test case. If there are no other events returned in that method, it'll may also be necessary to comment out the line in the addTestSteps() method that adds the particular test step to get the test case fully functional. In this specific case, it would be the line that looks like:

    addComponentTestStep(new Step9_ExecuteNewdocumenttypeAction());

    Unfortunately, we can't offer a patch to version 2.0 of the framework to resolve the issue, due to the cause of the issue actually being in the Webtop product code rather than in the automated test framework. The workaround of commenting out the erroneous SetValueEvent call or test step addition should work though. Sorry for the inconvienence.

    Linda

  • mingus
    edited September 22, 2008 #7
    Options

    Thanks a lot!