From: Gerard D. <ger...@or...> - 2013-12-10 11:05:28
|
On 6 Dec 2013, at 14:01, vikas jain <vic...@gm...> wrote: > Gerard, > > I understood your first concept where Costello can be opened as a menu when my product is opened in debug mode. So, to do that , this is the code I need to put into my main([]) class or where ? > > EditorContext ec = new EditorContext(); > ec.setEmbedded(true); > > TestHierarchy th = new TestHierarchy(); > ec.setTestHierarchy(th); > > Costello.showCostello(ec); > > // Make sure that we don't ignore the exisitng main window > th.setFiltered(mainWindow, false); > > Where I need to put this code to make it working (a menu item in my product itself) ... Yup, you need to wire this into your product. > > Second question :- I didn't understand the second part , can you please elaborate little bit more ... > > You can also do useful stuff like overriding the default template used for new scripts, which can be useful. If you look at the EditorContext there are a few interesting method you can override, one thing with a template is that it means the default component references can be shared between all the test you create. > This way the startup will be as per your normal application which gives better fidelity. We use a system property to read a file that causes tests to be loaded an run. So we start Oracle JDeveloper with a system properly -Dabbot.properties=xxxx this points to a .properties file which gives a list of what tests to run and what filters to apply. For examples just run the Sanity tests not the long regression tests. Internally the bit of code that puts in the Costello menu item will look for this property and it set it will take over and start running your tests. You can do this using the ScriptFixture object - although you might need to build some test fixture code around this. Can’t share the code we use as it is too deep into JDeveloper. Gerard > > Thanks so much , > > Regards. > Vicky. > > > > > > On Fri, Dec 6, 2013 at 6:58 AM, Gerard Davison <ger...@or...> wrote: > > > All, > > We do this the other way around, in our product we start Costello, and indeed run Abbot test scripts from a menu that gets added to the product when built in debug mode. There is a special interface for invoking Costello that tells it is running inside another product. The code looks like this: > > > EditorContext ec = new EditorContext(); > ec.setEmbedded(true); > > TestHierarchy th = new TestHierarchy(); > ec.setTestHierarchy(th); > > Costello.showCostello(ec); > > // Make sure that we don't ignore the exisitng main window > th.setFiltered(mainWindow, false); > > You can also do useful stuff like overriding the default template used for new scripts, which can be useful. This way the startup will be as per your normal application which gives better fidelity. We use a system property to read a file that causes tests to be loaded an run. > > Hope this is of some help, > > Gerard > > > On 5 Dec 2013, at 21:42, James Doyle <jd...@is...> wrote: > >> Hi Vicky, >> >> The JNLP file needs to add the Abbot jars (I think this list is out of date): >> >> <!-- The following jar elements are required to launch Abbot. The abbot jar >> must be first since it contains the main class. --> >> <jar href="http://xxx/abbot-signed.jar"/> >> <jar href="http://xxx/junit-signed.jar"/> >> <jar href="http://xxx/MRJToolkitStubs-signed.jar"/> >> <jar href="http://xxx/gnu-regexp-signed.jar"/> >> <jar href="http://xxx/jdom-signed.jar"/> >> <jar href="http://xxx/xerces-signed.jar"/> >> <jar href="http://xxx/bsh-signed.jar"/> >> >> And the JNLP file needs to switch its main class: >> >> <application-desc main-class="abbot.editor.Costello"/> >> >> The thing to be clear about this approach is....you are not launching a Java Web Start application from Costello. Your application is coming along with Costello, which is now the Java Web Start application specified by your JNLP file. Costello is merely executing your application's main method to initialize it and cause it to display its frames and windows. To literally launch a Java Web Start application using its JNLP file from Costello, Costello would have to create a new JVM process running the Java Web Start main program, and I don't know how Costello would do that or whether it would be able to do anything with the new separate JVM process. >> >> Jim >> >> vikas jain wrote: >>> >>> James, >>> >>> I am looking from QA point of view. I can have all the jar files on my machine. But how do I launch my http://<address>/.jnlp application from Costello. If you can provide some steps or sample of how you have done it, it would be great . >>> >>> Thanks, >>> Vicky. >>> >>> >>> >>> >>> >>> >>> On Thu, Dec 5, 2013 at 3:04 PM, James Doyle <jd...@is...> wrote: >>> Hi Vicky, >>> >>> We have a similar Java Web Start (JNLP client) application that we test with Abbot. >>> >>> For a while I was experimenting with doing the test script writing/recording through Java Web Start as well, particularly so that QA folks (not our development team) could do it. The way we had to deliver it, is to make the Abbot Test Script Editor (Costello) its own Java Web Start application with its own JNLP file that includes all the jar files needed by the application under test. The person editing the test script would have to: >>> >>> 1. Launch the Costello Java Web Start application on their local machine. >>> 2. Select a test script file on their local machine that "launches" the application under test by running its main method. >>> 3. Use Costello to run the "launch" step, thereby initializing the application under test and showing its windows/frames. >>> >>> It was a little pain to manage it this way, though. >>> >>> What we have now is that the development team can use Costello to launch the application under test, with all jar files built on their local machine. The downside is that it doesn't exercise the application *exactly* as it launches under Java Web Start, which would be a pain if the Java Web Start class loading makes a large difference to the application, or maybe a show-stopper if the application requires Java Web Start specific APIs. >>> >>> Good luck, >>> Jim >>> >>> >>> vikas jain wrote: >>>> >>>> >>>> Hey, >>>> >>>> I am planning to write/record automation tests for a application which launches with .jnlp URL. What I mean is URL for my application ends with .jnlp. I put the URL in browser and it open the application in a separate window, there is no role of browser after loading the application. >>>> >>>> Can you please tell me if we can do automation testing for this app via Abbot. If not is there tool I can use to record/write automation for this app. I am not able to find more information on internet around this. >>>> >>>> This is for my company and I am ready for commercial paid support if any. >>>> >>>> Thanks you very much. >>>> Regards, >>>> Vicky. >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Sponsored by Intel(R) XDK >>>> Develop, test and display web and hybrid apps with a single code base. >>>> Download it for free now! >>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >>>> >>>> _______________________________________________ >>>> abbot-users mailing list >>>> abb...@li... >>>> https://lists.sourceforge.net/lists/listinfo/abbot-users >>>> >>> >>> ------------------------------------------------------------------------------ >>> Sponsored by Intel(R) XDK >>> Develop, test and display web and hybrid apps with a single code base. >>> Download it for free now! >>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> abbot-users mailing list >>> abb...@li... >>> https://lists.sourceforge.net/lists/listinfo/abbot-users >>> >>> >> ------------------------------------------------------------------------------ >> Sponsored by Intel(R) XDK >> Develop, test and display web and hybrid apps with a single code base. >> Download it for free now! >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________ >> abbot-users mailing list >> abb...@li... >> https://lists.sourceforge.net/lists/listinfo/abbot-users > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > abbot-users mailing list > abb...@li... > https://lists.sourceforge.net/lists/listinfo/abbot-users > > > ------------------------------------------------------------------------------ > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________ > abbot-users mailing list > abb...@li... > https://lists.sourceforge.net/lists/listinfo/abbot-users |