It's all about the answers!

Ask a question

Starting RQM adapter automatically when server boots up


Barb I (71710) | asked Jun 11 '13, 3:11 p.m.
retagged Jun 12 '13, 10:11 a.m. by Max Bridges (24126)

We're using RFT 8.3 and RQM 4.0.1.

We do not intend to install RFT on endusers desktops. Instead it's installed on a box that's remotely accessible to a subset of users to create test scripts and import them into RQM. Then the testers will execute them from the RQM web interface.

I'm having issues getting the RQM adapter which resides on the RFT box to be setup to start and work automatically when the box reboots.

I've created a bat file which has one line of code which is along the lines of:

....\RQMAdapter\startadapter.bat -repository https://server/:9443/qm -user <ID> -password <pass> -adapter "RFT Adapter Name -projectArea "Project Name"

I then created a new scheduled task which runs the bat file when the box reboots.

It works. I see the javaw.exe file is running.

When I get into RQM that adapter choice is listed and showing as available (green). Note that RQM is on a completely different box.

But when I run a script that was imported from RFT using that adapter it will always fail.  In fact it basically gets no where.

As a very simple test I started the Classic CD app that comes with RFT, logged in, went to order something and then stopped recording the script. When running that test script using the RQM adapter that started on login (in the background) I get the following results.

FAIL

10-Jun-2013 03:58:38.578 PM

TestScript.testMain had an unhandled exception.

  • Simplified Script Group Names = [ClassicsCD]

  • click() called on GuiTestObject(Name: placeOrder, Map: PlaceOrder).

  • com.rational.test.ft.WindowActivateFailedException

  • unknown reason

  • Script Name = TestScript

  • Script Id = TestScript.java

  • Simplified Script Group Names = [ClassicsCD]

  • Simplified Script Line number = 3

  • Click Place Order

  • Line Number = 49

  • at com.rational.test.ft.domain.java.awt.TopLevelWindowProxy.activate(TopLevelWindowProxy.java:487) at com.rational.test.ft.domain.java.JavaGuiProxy.activateTopWindow(JavaGuiProxy.java:791) at com.rational.test.ft.domain.java.JavaGuiProxy.activateTopWindow(JavaGuiProxy.java:799) at com.rational.test.ft.domain.java.JavaGuiProxy.activateTopWindow(JavaGuiProxy.java:799) at com.rational.test.ft.domain.java.JavaGuiProxy.activateTopWindow(JavaGuiProxy.java:799) at com.rational.test.ft.domain.java.JavaGuiProxy.activateTopWindow(JavaGuiProxy.java:799) at com.rational.test.ft.domain.java.JavaGuiProxy.nClick(JavaGuiProxy.java:898) at com.rational.test.ft.domain.java.JavaGuiProxy.click(JavaGuiProxy.java:827) at com.rational.test.ft.domain.java.JavaGuiProxy.click(JavaGuiProxy.java:816) ------------------------------ at com.rational.test.ft.object.interfaces.ClientTestObject.invokeProxy(ClientTestObject.java:411) at com.rational.test.ft.object.interfaces.GuiTestObject.click(GuiTestObject.java:593) at TestScript.testMain(TestScript.java:49) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) at org.eclipse.equinox.launcher.Main.main(Main.java:1384) at org.eclipse.core.launcher.Main.main(Main.java:34)

  • rational_ft_screensnapshot.jpg1024768

I am also remotely logged into the RFT box and the app never tries to start.

But if, then on that RFT box, I go to Start -- Run and paste the exact same command line that the scheduled task is executing the adapter starts (in the foreground) and another javaw.exe process starts and RQM sees another adapter and when I run the same script in RQM against that 2nd adapter it works.

Anyone know what's going on?


Thanks

2 answers



permanent link
Ara Masrof (3.1k15) | answered Jun 12 '13, 7:35 a.m.
JAZZ DEVELOPER
 Barb,
This doesn't seem like an adapter issue to me; it looks as though the test script is having troubling running/interacting with the application based on the current state of the system.
I would create a new RFT script that contains nothing more than a logging statement (i.e. just one command that outputs text to the log no recorded actions at all). Import this script into RQM and try running it using the Adapter started from the command line.
From this test, we should be able to determine whether the underlying issue is with the adapter or script  

Ara


permanent link
Barb I (71710) | answered Jun 13 '13, 10:55 a.m.

Thanks for your post Ara.

I don't think you saw the very bottom of my post after the error message where it says that I did do exactly as you suggested and am able to run the script without a problem if I manually start the adapter from the command line using the exact same command that is being executed from the scheduled task. I then get into RQM and execute the exact same script when associated to this adapter and don't have any problems.

In thinking about it some more the difference between the 2 situations is that the scheduled task is owned by the local system account 'SYSTEM' and the other adapter is being kicked of by my account. Both accounts have admin access to the box. The owner of the associated javaw process is different.

If I change the scheduled task to be owned by my account everything works correctly. The problem is that company policy prevents me from saving my (or any) password which means that when the box is rebooted the scheduled task won't startup since there's no password associated with it. That's why I was trying to use 'SYSTEM'.

I'm stuck.

Maybe rather than troubleshoot what's going on in my situation I'll ask if anyone's gotten the RQM adapter to be setup so that it will startup automatically when a box boots-up? If so could you explain how it's setup.

Thanks.

Your answer


Register or to post your answer.