Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » How to restart aut while recording?(Is it possible to close the application which is now under recording and start again.)
How to restart aut while recording? [message #1691700] Thu, 09 April 2015 03:54 Go to next message
Eclipse UserFriend
I want to close the application which is under recording and restart again. The same script need to continue recording the application.

There is an ECL script like
wait-until-eclipse-is-ready
which is restarting the application automatically while recording. But after restarting, the recording is not continuing. Is there a way to do this?
Re: How to restart aut while recording? [message #1691701 is a reply to message #1691700] Thu, 09 April 2015 03:58 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

You can stop recording, manually add in the end of generated script the following commands:
restart-aut
wait-until-eclipse-is-ready

Save the Test Case and click "Record" button again. Existing code will be executed and recording will be continued.
Please try and let me know if it is helpful for you.
Re: How to restart aut while recording? [message #1691708 is a reply to message #1691701] Thu, 09 April 2015 04:15 Go to previous messageGo to next message
Eclipse UserFriend
I tried it and this is my script

get-about-menu | click
with [get-window "About Project_Name"] {
    get-editbox | set-text-offset 15 1
    close
}
restart-aut
wait-until-eclipse-is-ready


Two Dalog Box appears
"Couldn't open ECL session"

Failed to ececute command
org.eclipse.rcptt.tesla.ecl.model.impl.ShoutdownPlayerImpl@766cf918 (host:null) 


Would you like to view log file.

When I open log file, it shows the following error at the end.

[org.eclipse.rcptt.tesla.swt.e4x] info register aspect org.eclipse.rcptt.tesla.swt.aspects.ImagesAspect

!ENTRY org.eclipse.rcptt.runtime.ui 1 0 2015-04-09 01:12:27.233
!MESSAGE Workbench is about to shut down
!STACK 0
java.lang.Exception: Just to get a current stack trace logged. This is not an error.
	at org.eclipse.rcptt.internal.runtime.ui.Q7RuntimeStartup$1.preShutdown(Q7RuntimeStartup.java:33)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:905)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.ui.internal.Workbench.firePreShutdown(Workbench.java:903)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1038)
	at org.eclipse.ui.internal.Workbench.access$19(Workbench.java:1028)
	at org.eclipse.ui.internal.Workbench$19.run(Workbench.java:1331)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1329)
	at org.eclipse.ui.internal.Workbench.restart(Workbench.java:2484)
	at org.eclipse.rcptt.tesla.ecl.internal.impl.commands.RestartAutService$1.run(RestartAutService.java:30)
	at org.eclipse.swt.widgets.RunnableLock.run_aroundBody0(RunnableLock.java:35)
	at org.eclipse.swt.widgets.RunnableLock$AjcClosure1.run(RunnableLock.java:1)
	at org.eclipse.rcptt.tesla.swt.aspects.DisplayAspect.ajc$around$org_eclipse_rcptt_tesla_swt_aspects_DisplayAspect$10$90b1ba39proceed(DisplayAspect.aj:1)
	at org.eclipse.rcptt.tesla.swt.aspects.DisplayAspect.ajc$around$org_eclipse_rcptt_tesla_swt_aspects_DisplayAspect$10$90b1ba39(DisplayAspect.aj:366)
	at org.eclipse.swt.widgets.RunnableLock.run_aroundBody2(RunnableLock.java:35)
	at org.eclipse.swt.widgets.RunnableLock$AjcClosure3.run(RunnableLock.java:1)
	at org.eclipse.rcptt.sherlock.aspects.swt.DisplayAspect.ajc$around$org_eclipse_rcptt_sherlock_aspects_swt_DisplayAspect$2$90b1ba39proceed(DisplayAspect.aj:1)
	at org.eclipse.rcptt.sherlock.aspects.swt.DisplayAspect.ajc$around$org_eclipse_rcptt_sherlock_aspects_swt_DisplayAspect$2$90b1ba39(DisplayAspect.aj:63)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3717)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3366)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at com.app.rcp.Application.start(Application.java:125)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
[org.eclipse.ui.views] info AspectJ Weaver Version 1.7.3 built on Thursday Jun 13, 2013 at 19:41:31 GMT
[org.eclipse.ui.views] info register aspect org.eclipse.rcptt.tesla.recording.aspects.RecordingAspect

!ENTRY org.eclipse.rcptt.tesla.swt.aspects 1 0 2015-04-09 01:12:34.139
!MESSAGE Device is disposed. This is not an error.
!STACK 0
java.lang.RuntimeException: Device is disposed. This is not an error.
	at org.eclipse.rcptt.tesla.swt.aspects.DebugDisplayAspect.logStackTrace(DebugDisplayAspect.aj:19)
	at org.eclipse.rcptt.tesla.swt.aspects.DebugDisplayAspect.ajc$before$org_eclipse_rcptt_tesla_swt_aspects_DebugDisplayAspect$4$c96661b3(DebugDisplayAspect.aj:56)
	at org.eclipse.swt.graphics.Device.dispose(Device.java:245)
	at com.app.rcp.Application.start(Application.java:137)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

!ENTRY org.eclipse.rcptt.tesla.swt.aspects 1 0 2015-04-09 01:12:34.163
!MESSAGE Display deregister called. This is not an error.
!STACK 0
java.lang.RuntimeException: Display deregister called. This is not an error.
	at org.eclipse.rcptt.tesla.swt.aspects.DebugDisplayAspect.logStackTrace(DebugDisplayAspect.aj:19)
	at org.eclipse.rcptt.tesla.swt.aspects.DebugDisplayAspect.ajc$before$org_eclipse_rcptt_tesla_swt_aspects_DebugDisplayAspect$3$1f698375(DebugDisplayAspect.aj:47)
	at org.eclipse.swt.widgets.Display.deregister(Display.java:1112)
	at org.eclipse.swt.widgets.Display.destroy(Display.java:1131)
	at org.eclipse.swt.graphics.Device.dispose(Device.java:249)
	at com.app.rcp.Application.start(Application.java:137)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

[Updated on: Thu, 09 April 2015 04:30] by Moderator

Re: How to restart aut while recording? [message #1691723 is a reply to message #1691708] Thu, 09 April 2015 05:42 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for details! I'll try to reproduce it.
Do you have any problems with replaying this lines:
restart-aut
wait-until-eclipse-is-ready


As a workaround for now try to do the following steps:
1. Record a snippet before restarting
2. Save it to test case
3. Add to the test case mentioned lines
4. Execute test
5. Click button "Record a snippet"
6. Record actions after restarting
7. Add generated script to the test case.

Please try and let me know if it helps.
Re: How to restart aut while recording? [message #1691729 is a reply to message #1691723] Thu, 09 April 2015 06:22 Go to previous messageGo to next message
Eclipse UserFriend
"Record a snippet" option always creates a new test case. It does not merge with already existing one. Even if I try to merge manually with the two lines you have given, the issue still exist.

How does RCPTT keep in track of which application it is now testing. When that application gets closed, how does the recorder know that the application has ended. If it starts again, how does the recorder gets back the control?

Every time when I run a project for testing a relevent aut-<Project_Name> gets created. Is it possible for the same project to have multiple aut-<project_name> ? How can I import them into different Tests?

My Scenario is this:
I have a lot of data in a nebula grid. I open and change that data. Then I close the application, start the application again and check if the data which I changed got changed or not. This is my test case. I think restarting is the only way of doing it. Is there any other way? Can context help me in saving the data and then we can start a new test case which execute consecutive to this one?

One more question:
Can I create a context of already preloaded data. In the same RCPTT project, I need to have two or more contexts. One with the preloaded data and another with empty workspace. When I import preloaded data context into my test, I need to get all the data loaded. If I import the empty context, then empty workspace need to appear. For each test, my type of context need to vary. Is this possible? How can I do this?

Thank you.

[Updated on: Thu, 09 April 2015 08:19] by Moderator

Re: How to restart aut while recording? [message #1692057 is a reply to message #1691729] Mon, 13 April 2015 01:49 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Quote:
"Record a snippet" option always creates a new test case. It does not merge with already existing one. Even if I try to merge manually with the two lines you have given, the issue still exist.

Could you please attach the whole ECL script after merging? Please execute that test case (Replay in Test Editor), after execution click Details... in Execution View and send us content of appeared window.

When you start to execute test case RCPTT asks to select AUT
index.php/fa/21516/0/
How to set which AUT Test Case is for you can find here.

As for preloaded data you can use one of the most powerful RCPTT features - contexts. You can find more information about contexts here.
Re: How to restart aut while recording? [message #1692081 is a reply to message #1692057] Mon, 13 April 2015 05:48 Go to previous messageGo to next message
Eclipse UserFriend
This is the ECL script after merging
get-menu "File/New..." | click
get-window New | get-button Cancel | click
restart-aut
wait-until-eclipse-is-ready
get-about-menu | click


This is the Details in execution View
Report:
  Test case *RestartTest1* time: 29.200 s
    Result: ERROR, message: Couldn't open ECL session
      java.lang.Throwable: java.net.ConnectException: Connection refused
      	at java.net.PlainSocketImpl.socketConnect(Native Method)
      	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
      	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      	at java.net.Socket.connect(Socket.java:579)
      	at java.net.Socket.connect(Socket.java:528)
      	at org.eclipse.rcptt.ecl.client.tcp.EclTcpSession.initSocket(EclTcpSession.java:142)
      	at org.eclipse.rcptt.ecl.client.tcp.EclTcpSession.<init>(EclTcpSession.java:74)
      	at org.eclipse.rcptt.ecl.client.tcp.EclTcpClientManager.startClientSession(EclTcpClientManager.java:26)
      	at org.eclipse.rcptt.internal.launching.aut.BaseAutLaunch.createEclSession(BaseAutLaunch.java:976)
      	at org.eclipse.rcptt.internal.launching.aut.BaseAutLaunch.execute(BaseAutLaunch.java:192)
      	at org.eclipse.rcptt.internal.launching.aut.BaseAutLaunch.execute(BaseAutLaunch.java:160)
      	at org.eclipse.rcptt.internal.launching.aut.BaseAutLaunch.execute(BaseAutLaunch.java:155)
      	at org.eclipse.rcptt.internal.launching.reporting.ReportMaker.endReportNode(ReportMaker.java:75)
      	at org.eclipse.rcptt.internal.launching.reporting.ReportMaker.endReportNode(ReportMaker.java:62)
      	at org.eclipse.rcptt.internal.launching.ecl.EclScenarioExecutable.postExecute(EclScenarioExecutable.java:83)
      	at org.eclipse.rcptt.internal.launching.Executable.executeAndRememberResult(Executable.java:157)
      	at org.eclipse.rcptt.internal.launching.Executable.executeAndRememberResult(Executable.java:138)
      	at org.eclipse.rcptt.internal.launching.Q7LaunchManager$SessionRunnable.run(Q7LaunchManager.java:140)
      	at org.eclipse.rcptt.internal.launching.Q7LaunchManager$ExecThread$1.run(Q7LaunchManager.java:685)
      	at java.lang.Thread.run(Thread.java:745)

  --------------Logs BEGIN-------------------
  --------------Logs END-------------------


Please guide me in restarting. I think some port isn't open. How to open if it isn't.

Thank you
Jeevan

[Updated on: Wed, 15 April 2015 08:41] by Moderator

Re: How to restart aut while recording? [message #1692851 is a reply to message #1692081] Mon, 20 April 2015 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Is there any update in this thread? let me know if anything I need to try.
Re: How to restart aut while recording? [message #1692861 is a reply to message #1692851] Mon, 20 April 2015 05:46 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

I've tried to reproduce it locally, but restart-aut works fine for me.
Could you please share your AUT? Trial version or something like that and test project for reproducing.
You can send details to my e-mail (olga.yurchuk@xored.com)
Re: How to restart aut while recording? [message #1692864 is a reply to message #1692861] Mon, 20 April 2015 06:00 Go to previous messageGo to next message
Eclipse UserFriend
I am afraid that I can't give you the AUT. But I guess there is some socket connection. Do I need some permission to open a socket? Do I need to open any port number or something? Let me know on that.

When I chick on the Details button of the error, is what I have attached as file.
  • Attachment: Details.txt
    (Size: 34.70KB, Downloaded 354 times)

[Updated on: Mon, 20 April 2015 06:26] by Moderator

Re: How to restart aut while recording? [message #1693305 is a reply to message #1692864] Thu, 23 April 2015 02:23 Go to previous messageGo to next message
Eclipse UserFriend
Hello,
Could you please provide me with some additional details, which typically helps to investigate AUT start problem:

1. Original <your AUT>.ini, <your AUT>/configuration/config.in and <your AUT>/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info (if present)
2. RCPTT-generated config files: <rcptt-workspace>/.metadata/.plugins/org.eclipse.pde.core/<your aut name>/config.ini and <rcptt-workspace>/.metadata/.plugins/org.eclipse.pde.core/<your aut name>/org.eclipse.equinox.simpleconfigurator/bundles.info (if present)
3. Generated .launch file: <rcptt-workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches/<your aut name>.launch
4. AUT log
Re: How to restart aut while recording? [message #1693329 is a reply to message #1693305] Thu, 23 April 2015 05:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I have tried with eclipse framework, it did work and it doesn't work only for my AUT. I am attaching the files which you have asked for.

Attachment Details:
1_aut.ini - <your AUT>.ini
1_config.in - <your AUT>/configuration/config.in
1_bundles.info - <your AUT>/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
2_config.ini - <rcptt-workspace>/.metadata/.plugins/org.eclipse.pde.core/<your aut name>/config.ini
2_bundles.info - <rcptt-workspace>/.metadata/.plugins/org.eclipse.pde.core/<your aut name>/org.eclipse.equinox.simpleconfigurator/bundles.info

This code is the content of my - <rcptt-workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches/<your aut name>.launch
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.rcptt.launching.ext">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="com.company.qti.qsip.rcp.application"/>
<booleanAttribute key="askclear" value="true"/>
<stringAttribute key="aut-location" value="/prj/iceng/qsip1/workspaces/c_jrex/RCPTT/QSIP/linux"/>
<stringAttribute key="aut-target-platform" value="AUT QSIP (Target Platform)"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="com.xored.launching.common.attrArch" value="x86_64"/>
<stringAttribute key="location" value="${workspace_loc}/../aut-QSIP"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_APPEND_TO_FILE" value="true"/>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="/prj/iceng/qsip1/workspaces/c_jrex/RCPTT/workspace_rcptt/.metadata/.plugins/org.eclipse.pde.core/QSIP/console.log"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.7.0-openjdk-1.7.0"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch x86_64 -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1024m -XX:MaxPermSize=512m -Declipse.vm=qsip.bin"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="/prj/iceng/qsip1/workspaces/c_jrex/RCPTT/QSIP/linux"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.company.qti.qsip.rcp.qsip_product"/>
<booleanAttribute key="useProduct" value="true"/>
</launchConfiguration>


Regarding AUT log, i have already attached all the important log in the previous conversations. Can you be particular which you need?

Thank you.
  • Attachment: 1_aut.ini
    (Size: 0.27KB, Downloaded 156 times)
  • Attachment: 1_bundles.info
    (Size: 33.89KB, Downloaded 129 times)
  • Attachment: 1_config.ini
    (Size: 0.78KB, Downloaded 140 times)
  • Attachment: 2_bundles.info
    (Size: 87.55KB, Downloaded 147 times)
  • Attachment: 2_config.ini
    (Size: 1.06KB, Downloaded 133 times)

[Updated on: Thu, 23 April 2015 05:16] by Moderator

Re: How to restart aut while recording? [message #1693364 is a reply to message #1693329] Thu, 23 April 2015 10:02 Go to previous message
Eclipse UserFriend
Thanks for details!
It will take some time to invesigate it.
Previous Topic:[TUTO] Test new ecl command example
Next Topic:Need help on ECL script
Goto Forum:
  


Current Time: Tue Jun 24 07:04:21 EDT 2025

Powered by FUDForum. Page generated in 0.06801 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top