Cannot playback recorded test, framework arguments issue

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Cannot playback recorded test, framework arguments issue

Postby ajbetz » Wed Jan 05, 2011 4:35 pm

I have an application that is based on Eclipse RCP. After specifying my application in the "run configuration" dialog to set up a runtime for recording my test, my application loads and I am able to record my sample test. However, when I go to playback my test as a JUnit Plug-in Test, my application is returning an error message stating that one of the parameters is unrecognized:

Code: Select all
Unrecognized command line argument "3".
 
Use "help" command for information about available commands.


This is a default statement that gets printed out by the application for unrecognized arguments that are passed into it. After looking at the framework arguments that are posted on the console of the JUnit Test Runner, I conclude that the unrecognized parameter is coming from one of the framework arguments:
Code: Select all
Framework arguments:  -version 3 -port 56458 -testLoaderClass .......


This only happens when I try and execute Window Tester Pro tests on my application under test. I figure that what is happening is that those framework arguments get ignored when they are passed into a sample app like the Eclipse IDE; however, these framework arguments, instead of being ignored, are being consumed by my application which is attempting to verify the validity of arguments and parameters that are passed into it.

This leaves me with the following questions:

1. Where are these Framework arguments coming from? How would I change them if, for example, I wanted to remove that portion that loads the "-version 3" part of those framework arguments?

2. Is there a way that I can tell the JUnit Test loader to consume certain arguments, or, better yet, not pass certain arguments down to the application under test?
ajbetz
 
Posts: 17
Joined: Wed Jan 05, 2011 4:10 pm
Location: Beaverton, OR

Re: Cannot playback recorded test, framework arguments issue

Postby keertip » Fri Jan 07, 2011 12:26 pm

These are not arguments passed by WindowTester, not sure where they are coming from. Sorry, don't know if there is a way of telling the JUnit Test loader not to pass on arguments.
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: Cannot playback recorded test, framework arguments issue

Postby ajbetz » Wed Jan 12, 2011 2:02 pm

Thanks for the response!

After doing a little more investigation, I realized that nothing WindowsTester specific is going on here ... what is happening is that the PDE launcher framework is passing along those arguments to the runtime eclipse (my application). I have been asking around on the Eclipse Forums if there is a way to specify to PDE NOT to forward certain arguments (like via a .properties file) , but I don't think there is something like this
ajbetz
 
Posts: 17
Joined: Wed Jan 05, 2011 4:10 pm
Location: Beaverton, OR

Re: Cannot playback recorded test, framework arguments issue

Postby keertip » Wed Jan 12, 2011 3:02 pm

Thanks for getting back with the cause of the problem. Glad to see that it is not WindowTester!!
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest

cron