It's all about the answers!

Ask a question

RQMAutomationSample Problems executing Test Scripts. (test script doesnt finish even though test executed correctly)


Mauricio Garza Colome (1111) | asked Apr 06 '16, 10:39 a.m.

I'm trying to make an adapter to be used in RQM to automate test script execution. I followed the instructions specified on this page https://wiki.eclipse.org/Lyo/BuildClient for building the client in Eclipse and also the "Running the RQMAutimationSample" part. (I changed the adapter.properties file to use my project area, user/password, etc.

I would like to have the Sample up and running to have an example on how it should look like..

I was able to successfully login and register my adapter to RQM.

After I created a Test Script for the adapter and added it to a Test Case and ran it, RQM executes the script and tells me that the script executed successfully but it stops at 50%. Eclipse shows me the following Log in the console:

Apr 06, 2016 3:55:41 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample configureAdapter
INFO: Loading cached adapter properties from file:/U:/git/org.eclipse.lyo.client/org.eclipse.lyo.client.java.sample/target/classes/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties
Apr 06, 2016 3:55:42 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample configureAdapter
INFO: Logging into service provider at https://rb-alm-12-p.de.bosch.com/qm
Apr 06, 2016 3:55:52 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample configureAdapter
INFO: Registering with service provider
Apr 06, 2016 3:55:54 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample begin
INFO: Starting heart beat thread for adapter at https://rb-alm-12-p.de.bosch.com/qm/oslc_auto_test/contexts/_QEvkT8NGEeStnojX_LZzWw/resources/com.ibm.rqm.execution.ToolAdapter/_ZIaH4PvsEeWx6KzxgbNObA
Apr 06, 2016 3:55:54 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample begin
INFO: Starting adapter polling at https://rb-alm-12-p.de.bosch.com/qm/oslc_auto_test/contexts/_QEvkT8NGEeStnojX_LZzWw/resources/com.ibm.rqm.execution.ExecutionRequest?oslc.where=rqm_auto%3AexecutesOnAdapter%3D%3Chttps%3A%2F%2Frb-alm-12-p.de.bosch.com%2Fqm%2Foslc_auto_test%2Fcontexts%2F_QEvkT8NGEeStnojX_LZzWw%2Fresources%2Fcom.ibm.rqm.execution.ToolAdapter%2F_ZIaH4PvsEeWx6KzxgbNObA%3E+and+rqm_auto%3Ataken%3Dfalse+and+oslc_auto%3Astate%21%3D%3Chttp%3A%2F%2Fopen-services.net%2Fns%2Fauto%23canceled%3E
Apr 06, 2016 4:04:59 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample handleAutomationRequest
INFO: Adapter has been assigned an Automation Request at https://rb-alm-12-p.de.bosch.com/qm/oslc_auto_test/contexts/_QEvkT8NGEeStnojX_LZzWw/resources/com.ibm.rqm.execution.ExecutionRequest/_ighWwfwAEeWx6KzxgbNObA
Apr 06, 2016 4:05:00 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample executeScript
INFO: Running script named 'test'
Apr 06, 2016 4:05:00 PM org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample executeScript
INFO: Input parameters:
ERROR [main] (OutPart.java:100) - The system could not find a writer for class [B and application/octet-stream; name=sample.png.  Locate a DataSourceProvider for the JavaBeans Activation Framework (JAF).
Exception in thread "main" org.eclipse.lyo.client.oslc.samples.automation.AutomationException: org.apache.wink.client.ClientRuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
    at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.handleAutomationRequest(RQMAutomationSample.java:221)
    at org.eclipse.lyo.client.oslc.samples.automation.AutomationAdapter.start(AutomationAdapter.java:513)
    at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.begin(RQMAutomationSample.java:91)
    at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.main(RQMAutomationSample.java:59)
Caused by: org.apache.wink.client.ClientRuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
    at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:240)
    at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:189)
    at org.apache.wink.client.internal.ResourceImpl.invokeNoException(ResourceImpl.java:181)
    at org.apache.wink.client.internal.ResourceImpl.post(ResourceImpl.java:322)
    at org.eclipse.lyo.client.oslc.OslcClient.createResource(OslcClient.java:347)
    at org.eclipse.lyo.client.oslc.OslcClient.createResource(OslcClient.java:326)
    at org.eclipse.lyo.client.oslc.samples.automation.AutomationAdapter.uploadAttachment(AutomationAdapter.java:1266)
    at org.eclipse.lyo.client.oslc.samples.automation.RQMAutomationSample.handleAutomationRequest(RQMAutomationSample.java:183)
    ... 3 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.handle(ApacheHttpClientConnectionHandler.java:90)
    at org.apache.wink.client.internal.handlers.HandlerContextImpl.doChain(HandlerContextImpl.java:52)
    at org.apache.wink.client.internal.handlers.AcceptHeaderHandler.handle(AcceptHeaderHandler.java:79)
    at org.apache.wink.client.internal.handlers.HandlerContextImpl.doChain(HandlerContextImpl.java:52)
    at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:227)
    ... 10 more
Caused by: java.lang.RuntimeException: javax.ws.rs.WebApplicationException
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.processRequest(ApacheHttpClientConnectionHandler.java:116)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.handle(ApacheHttpClientConnectionHandler.java:87)
    ... 14 more
Caused by: javax.ws.rs.WebApplicationException
    at org.apache.wink.common.model.multipart.OutPart.writeBody(OutPart.java:103)
    at org.apache.wink.common.model.multipart.OutPart.writePart(OutPart.java:130)
    at org.apache.wink.common.model.multipart.OutMultiPart.write(OutMultiPart.java:76)
    at org.apache.wink.common.internal.providers.multipart.OutMultiPartProvider.writeTo(OutMultiPartProvider.java:71)
    at org.apache.wink.common.internal.providers.multipart.OutMultiPartProvider.writeTo(OutMultiPartProvider.java:39)
    at org.apache.wink.client.internal.handlers.AbstractConnectionHandler.writeEntity(AbstractConnectionHandler.java:116)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.access$200(ApacheHttpClientConnectionHandler.java:72)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler$EntityWriter.writeTo(ApacheHttpClientConnectionHandler.java:405)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:622)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.processRequest(ApacheHttpClientConnectionHandler.java:113)
    ... 15 more

Do you know what might help me solve this problem?

Thanks in advance


Comments
Matthias Buettgen commented May 13 '16, 2:23 a.m. | edited May 13 '16, 2:27 a.m.

Hi,

the wink client version defined in the POM of the client (org.eclipse.lyo.client.git) is not correct. It's set to 1.1.3-incubating but it should be 1.2.1-incubating

<dependency>
    <groupId>org.apache.wink</groupId>
    <artifactId>wink-client</artifactId>
    <version>1.2.1-incubating</version>
</dependency>

2 answers



permanent link
Subhajit Bhuiya (6222) | answered Apr 07 '16, 9:32 a.m.
JAZZ DEVELOPER
Setup custom type script in Project area administration page. Make sure the Adapter Id specified is exactly same as provided in sample adapter (org.eclipse.lyo.clients.oslc.sample).

Comments
Mauricio Garza Colome commented Apr 08 '16, 4:43 a.m.

Thanks for your response.

I had an Internal Error 500 before which didnt allow my adapter to register. After a bit of googling i found out that setting up a custom script type with the org.eclipse.lyo.clients.oslc.sample as the ID solved that problem. My adapter was then able to connect normally..

The problem now is this error in my original question..
Do you mean I have to add a "Custom Test Automation Script Type Details"?

I tried adding it like you said and it asks for a "type" and the 3 types available (text,Integer,boolean) all dont seem to work.. or i just dont know what exactly what needs to be done so the sample.png gets "accepted" and the error goes away.

Am I filling out the wrong fields or do you know what else could be causing the problem?


permanent link
Aaron Ramirez (362) | answered May 31 '17, 11:35 a.m.
JAZZ DEVELOPER

 Hi Mauricio Garza Colome, not sure if you have already figured it out, I had the exact same problem and the way to solve it is modifying the POM file just like Matthias Bluettgen mentioned in the comment. After correcting the wink-client version, the exception disappeared.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.