From abdul.kolarkunnu at oracle.com Tue Oct 2 15:18:31 2018 From: abdul.kolarkunnu at oracle.com (Muneer Kolarkunnu) Date: Tue, 2 Oct 2018 08:18:31 -0700 (PDT) Subject: FW: Jemmy V2 - question (test-automation, blackbox) In-Reply-To: References: Message-ID: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> Hi Rev, ? We haven?t received this email in HYPERLINK "mailto:jemmy-dev at openjdk.java.net"jemmy-dev at openjdk.java.net . Can you please confirm you sent email to HYPERLINK "mailto:jemmy-dev at openjdk.java.net"jemmy-dev at openjdk.java.net only? Forwarding this to jemm-dev mailing list. ? Shura, Rev?s email hasn?t come to jemmy-dev mailing list. I also had same issue when I was sending emails to this mailing list in the initial days and somehow it got corrected. Can you please check. Also can you please reply to his query. ? Regards, Muneer ? From: Rev Kapuganti Sent: Tuesday, October 02, 2018 7:50 PM To: Muneer Kolarkunnu Subject: Fwd: Jemmy V2 - question (test-automation, blackbox) ? Hello Abdul. This is realated to a question that I have on Jemmy usecase which I posted on Jemmy-dev list. I'm also trying to reach out to you as I haven't heard from the developer mailing list. Any help would be greatly appreciated. ? Please find the posted below:? ? Hello Jemmy devs - ? Firstly great work!? I understand that in order to use jemmy v2? - SUT(in my case its a SWING front-end with ORPOS backend) needs to be launched on the same JVM instance that the test runs. I have a question(related to that). Any help/suggestion is greatly appreciated. ? My app under test needs a config xml(that points to bunch of other config files in the class path) along with JAVA OPTIONS passed to the main class in order to get launched. Currently its a command line launcher through a batch file.? How do I approach launching this via Jemmy tests?? I see a ClassReference method - startApp, but does it support complex parameters like in my case? ? Or do you recommend a different approach where I can run my app with jemmy agent(like solution) so I can reference the java objects from the running app later through my blackbox tests. ? ? Thanks in advance, appreciate any help. ? Rev? ? From alexandre.iline at oracle.com Tue Oct 2 15:51:02 2018 From: alexandre.iline at oracle.com (Alexandre (Shura) Iline) Date: Tue, 2 Oct 2018 08:51:02 -0700 Subject: Jemmy V2 - question (test-automation, blackbox) In-Reply-To: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> References: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> Message-ID: > From: Rev Kapuganti > > Sent: Tuesday, October 02, 2018 7:50 PM > To: Muneer Kolarkunnu > > Subject: Fwd: Jemmy V2 - question (test-automation, blackbox) > > Hello Abdul. This is realated to a question that I have on Jemmy usecase which I posted on Jemmy-dev list. I'm also trying to reach out to you as I haven't heard from the developer mailing list. Any help would be greatly appreciated. > > > Please find the posted below: > > > Hello Jemmy devs - > > Firstly great work! I understand that in order to use jemmy v2 - SUT(in my case its a SWING front-end with ORPOS backend) needs to be launched on the same JVM instance that the test runs. I have a question(related to that). Any help/suggestion is greatly appreciated. That assumption is absolutely correct. Jemmy v2 is working by requesting information from the AWT component hierarchy, and by calling component methods. Jemmy v2 is accessing the AWT API to get the necessary knowledge about the UI and also to post events to simulate user input or it is using Robot API for the same purpose. > > My app under test needs a config xml(that points to bunch of other config files in the class path) along with JAVA OPTIONS passed to the main class in order to get launched. Currently its a command line launcher through a batch file. How do I approach launching this via Jemmy tests? I see a ClassReference method - startApp, but does it support complex parameters like in my case? There are two general ways to run test code and the app code in the same VM: run test code from the application or run the application from the test code. The former would require modifying the original app, which may be harder than to implement the latter. To run the app from test, the most scalable approach is to just run the main class of the application from appropriate lifecycle methods of a test harness, such as TestNG or JUnit. After all, running a Java app is just running a main class with possible preparations and environment setting. If, for whatever reason, it is not possible to start the app from the harness setup methods, you can try to modify the batch file of yours by inserting your own class in front of the application main class which, the way I imagine your script, you already have in the line where java binary is called. > > Or do you recommend a different approach where I can run my app with jemmy agent(like solution) so I can reference the java objects from the running app later through my blackbox tests. The other approach to run some auxiliary code in every VM, is called "accessibility hook". That used to work before - I have not tried it in years. It would require changing some property files in the JDK install dir. I would not recommend looking into this approach unless you absolutely have to. Shura > > > Thanks in advance, appreciate any help. > > Rev > On Oct 2, 2018, at 8:18 AM, Muneer Kolarkunnu wrote: > > Hi Rev, > > We haven?t received this email in jemmy-dev at openjdk.java.net . Can you please confirm you sent email to jemmy-dev at openjdk.java.net only? > Forwarding this to jemm-dev mailing list. > > Shura, > Rev?s email hasn?t come to jemmy-dev mailing list. I also had same issue when I was sending emails to this mailing list in the initial days and somehow it got corrected. Can you please check. > Also can you please reply to his query. > > Regards, > Muneer > > From: Rev Kapuganti > > Sent: Tuesday, October 02, 2018 7:50 PM > To: Muneer Kolarkunnu > > Subject: Fwd: Jemmy V2 - question (test-automation, blackbox) > > Hello Abdul. This is realated to a question that I have on Jemmy usecase which I posted on Jemmy-dev list. I'm also trying to reach out to you as I haven't heard from the developer mailing list. Any help would be greatly appreciated. > > > Please find the posted below: > > > Hello Jemmy devs - > > Firstly great work! I understand that in order to use jemmy v2 - SUT(in my case its a SWING front-end with ORPOS backend) needs to be launched on the same JVM instance that the test runs. I have a question(related to that). Any help/suggestion is greatly appreciated. > > My app under test needs a config xml(that points to bunch of other config files in the class path) along with JAVA OPTIONS passed to the main class in order to get launched. Currently its a command line launcher through a batch file. How do I approach launching this via Jemmy tests? I see a ClassReference method - startApp, but does it support complex parameters like in my case? > > Or do you recommend a different approach where I can run my app with jemmy agent(like solution) so I can reference the java objects from the running app later through my blackbox tests. > > > Thanks in advance, appreciate any help. > > Rev From rev.sdet at gmail.com Mon Oct 1 14:17:46 2018 From: rev.sdet at gmail.com (Rev Kapuganti) Date: Mon, 1 Oct 2018 10:17:46 -0400 Subject: Jemmy V2 - question (test-automation, blackbox) Message-ID: Hello Jemmy devs - Firstly great work! I understand that in order to use jemmy v2 - SUT(in my case its a SWING front-end with ORPOS backend) needs to be launched on the same JVM instance that the test runs. I have a question(related to that). Any help/suggestion is greatly appreciated. My app under test needs a config xml(that points to bunch of other config files in the class path) along with JAVA OPTIONS passed to the main class in order to get launched. Currently its a command line launcher through a batch file. How do I approach launching this via Jemmy tests? I see a ClassReference method - startApp, but does it support complex parameters like in my case? Thanks in advance, appreciate any help. Rev From rev.sdet at gmail.com Tue Oct 2 15:27:17 2018 From: rev.sdet at gmail.com (Rev Kapuganti) Date: Tue, 2 Oct 2018 11:27:17 -0400 Subject: FW: Jemmy V2 - question (test-automation, blackbox) In-Reply-To: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> References: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> Message-ID: Hello Muneer - I got an email saying that its waiting on the moderator's approval but didn't get an approval!. Let me forward you that email. Meanwhile - do you have any answer for my question? Thanks, Rev On Tue, Oct 2, 2018 at 11:18 AM Muneer Kolarkunnu < abdul.kolarkunnu at oracle.com> wrote: > Hi Rev, > > > > We haven?t received this email in jemmy-dev at openjdk.java.net . Can you > please confirm you sent email to jemmy-dev at openjdk.java.net only? > > Forwarding this to jemm-dev mailing list. > > > > Shura, > > Rev?s email hasn?t come to jemmy-dev mailing list. I also had same issue > when I was sending emails to this mailing list in the initial days and > somehow it got corrected. Can you please check. > > Also can you please reply to his query. > > > > Regards, > > Muneer > > > > *From:* Rev Kapuganti > *Sent:* Tuesday, October 02, 2018 7:50 PM > *To:* Muneer Kolarkunnu > *Subject:* Fwd: Jemmy V2 - question (test-automation, blackbox) > > > > Hello Abdul. This is realated to a question that I have on Jemmy usecase > which I posted on Jemmy-dev list. I'm also trying to reach out to you as I > haven't heard from the developer mailing list. Any help would be greatly > appreciated. > > > > Please find the posted below: > > > > Hello Jemmy devs - > > > > Firstly great work! I understand that in order to use jemmy v2 - SUT(in > my case its a SWING front-end with ORPOS backend) needs to be launched on > the same JVM instance that the test runs. I have a question(related to > that). Any help/suggestion is greatly appreciated. > > > > My app under test needs a config xml(that points to bunch of other config > files in the class path) along with JAVA OPTIONS passed to the main class > in order to get launched. Currently its a command line launcher through a > batch file. How do I approach launching this via Jemmy tests? I see a > ClassReference method - startApp, but does it support complex parameters > like in my case? > > > > Or do you recommend a different approach where I can run my app with jemmy > agent(like solution) so I can reference the java objects from the running > app later through my blackbox tests. > > > > > > Thanks in advance, appreciate any help. > > > > Rev > > > From alexandre.iline at oracle.com Tue Oct 2 15:57:11 2018 From: alexandre.iline at oracle.com (Alexandre (Shura) Iline) Date: Tue, 2 Oct 2018 08:57:11 -0700 Subject: Jemmy question In-Reply-To: References: Message-ID: <8FD31EFF-5F11-49DB-A185-4A6DE5F045E2@oracle.com> > On Sep 17, 2018, at 6:56 AM, Mark Blum wrote: > > Hey, > > Is there a way to use Jemmy to test an already running Swift application? Swing? Or Swift? > > All my attempts to find a JFrame without first using > ClassReference().StartApplication() result in timeout errors. Provided the test code is executed within the same VM, everything should work. Shura > > Thanks, > Mark From rev.sdet at gmail.com Tue Oct 2 17:10:08 2018 From: rev.sdet at gmail.com (Rev Kapuganti) Date: Tue, 2 Oct 2018 13:10:08 -0400 Subject: Jemmy V2 - question (test-automation, blackbox) In-Reply-To: References: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> Message-ID: Thank you Shura, thats great details. Out of all the options you have recommended, I believe the below option sounds feasible because of the complexities and different custom parameters (configs )required for launching this heavy loaded OR-POS application and also my test automation framework of choice(Jruby based - runs on JVM). Unfortunately a simple java invocation of the main class with java_options and application params wouldn't do it. Preferred option - If, for whatever reason, it is not possible to start the app from the harness setup methods, you can try to modify the batch file of yours by inserting your own class in front of the application main class which, the way I imagine your script, you already have in the line where java binary is called. My question with this option is - My test suite(cucumber) entry point is a ruby-file( cucumber's env.rb : which creates an instance of Object class) and it then calls all the tests under the suite directory. I'm also using a bunch of JARs for doing a bunch of other things(to talk to databases, my simulation servers, reporting apps and others). I would like to mix in jemmy here for talking to the GUI of swing app. This cucumber suite(since its Jruby) is run on JVM through command-line(for example: Jruby -S cucumber -p test-profile). Are you recommending somehow adding this invocation along with the POS app's main class while launching it through the batch file? On Tue, Oct 2, 2018 at 11:51 AM Alexandre (Shura) Iline < alexandre.iline at oracle.com> wrote: > *From:* Rev Kapuganti > *Sent:* Tuesday, October 02, 2018 7:50 PM > *To:* Muneer Kolarkunnu > *Subject:* Fwd: Jemmy V2 - question (test-automation, blackbox) > > > Hello Abdul. This is realated to a question that I have on Jemmy usecase > which I posted on Jemmy-dev list. I'm also trying to reach out to you as I > haven't heard from the developer mailing list. Any help would be greatly > appreciated. > > Please find the posted below: > > > Hello Jemmy devs - > > Firstly great work! I understand that in order to use jemmy v2 - SUT(in > my case its a SWING front-end with ORPOS backend) needs to be launched on > the same JVM instance that the test runs. I have a question(related to > that). Any help/suggestion is greatly appreciated. > > > That assumption is absolutely correct. Jemmy v2 is working by requesting > information from the AWT component hierarchy, and by calling component > methods. Jemmy v2 is accessing the AWT API to get the necessary knowledge > about the UI and also to post events to simulate user input or it is using > Robot API for the same purpose. > > > My app under test needs a config xml(that points to bunch of other config > files in the class path) along with JAVA OPTIONS passed to the main class > in order to get launched. Currently its a command line launcher through a > batch file. How do I approach launching this via Jemmy tests? I see a > ClassReference method - startApp, but does it support complex parameters > like in my case? > > > There are two general ways to run test code and the app code in the same > VM: run test code from the application or run the application from the test > code. The former would require modifying the original app, which may be > harder than to implement the latter. To run the app from test, the most > scalable approach is to just run the main class of the application from > appropriate lifecycle methods of a test harness, such as TestNG or JUnit. > After all, running a Java app is just running a main class with possible > preparations and environment setting. > > If, for whatever reason, it is not possible to start the app from the > harness setup methods, you can try to modify the batch file of yours by > inserting your own class in front of the application main class which, the > way I imagine your script, you already have in the line where java binary > is called. > > > Or do you recommend a different approach where I can run my app with jemmy > agent(like solution) so I can reference the java objects from the running > app later through my blackbox tests. > > > > The other approach to run some auxiliary code in every VM, is called > "accessibility hook". That used to work before - I have not tried it in > years. It would require changing some property files in the JDK install > dir. I would not recommend looking into this approach unless you absolutely > have to. > > Shura > > > > Thanks in advance, appreciate any help. > > Rev > > > > On Oct 2, 2018, at 8:18 AM, Muneer Kolarkunnu > wrote: > > Hi Rev, > > We haven?t received this email in jemmy-dev at openjdk.java.net . Can you > please confirm you sent email to jemmy-dev at openjdk.java.net only? > Forwarding this to jemm-dev mailing list. > > Shura, > Rev?s email hasn?t come to jemmy-dev mailing list. I also had same issue > when I was sending emails to this mailing list in the initial days and > somehow it got corrected. Can you please check. > Also can you please reply to his query. > > Regards, > Muneer > > *From:* Rev Kapuganti > *Sent:* Tuesday, October 02, 2018 7:50 PM > *To:* Muneer Kolarkunnu > *Subject:* Fwd: Jemmy V2 - question (test-automation, blackbox) > > > Hello Abdul. This is realated to a question that I have on Jemmy usecase > which I posted on Jemmy-dev list. I'm also trying to reach out to you as I > haven't heard from the developer mailing list. Any help would be greatly > appreciated. > > Please find the posted below: > > > Hello Jemmy devs - > > Firstly great work! I understand that in order to use jemmy v2 - SUT(in > my case its a SWING front-end with ORPOS backend) needs to be launched on > the same JVM instance that the test runs. I have a question(related to > that). Any help/suggestion is greatly appreciated. > > My app under test needs a config xml(that points to bunch of other config > files in the class path) along with JAVA OPTIONS passed to the main class > in order to get launched. Currently its a command line launcher through a > batch file. How do I approach launching this via Jemmy tests? I see a > ClassReference method - startApp, but does it support complex parameters > like in my case? > > Or do you recommend a different approach where I can run my app with jemmy > agent(like solution) so I can reference the java objects from the running > app later through my blackbox tests. > > > Thanks in advance, appreciate any help. > > Rev > > > From alexandre.iline at oracle.com Tue Oct 2 18:49:12 2018 From: alexandre.iline at oracle.com (Alexandre (Shura) Iline) Date: Tue, 2 Oct 2018 11:49:12 -0700 Subject: Jemmy V2 - question (test-automation, blackbox) In-Reply-To: References: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> Message-ID: Rev, It is hard for me to answer your questions without knowing the specifics, sorry. From what you are saying, it looks like that you will have to modify more than one line in the launch script - could be so. Shura > On Oct 2, 2018, at 10:10 AM, Rev Kapuganti wrote: > > Thank you Shura, thats great details. Out of all the options you have recommended, I believe the below option sounds feasible because of the complexities and different custom parameters (configs )required for launching this heavy loaded OR-POS application and also my test automation framework of choice(Jruby based - runs on JVM). Unfortunately a simple java invocation of the main class with java_options and application params wouldn't do it. > > > Preferred option - > > If, for whatever reason, it is not possible to start the app from the harness setup methods, you can try to modify the batch file of yours by inserting your own class in front of the application main class which, the way I imagine your script, you already have in the line where java binary is called. > > > My question with this option is - My test suite(cucumber) entry point is a ruby-file( cucumber's env.rb : which creates an instance of Object class) and it then calls all the tests under the suite directory. I'm also using a bunch of JARs for doing a bunch of other things(to talk to databases, my simulation servers, reporting apps and others). I would like to mix in jemmy here for talking to the GUI of swing app. > > This cucumber suite(since its Jruby) is run on JVM through command-line(for example: Jruby -S cucumber -p test-profile). Are you recommending somehow adding this invocation along with the POS app's main class while launching it through the batch file? > > > > > > > On Tue, Oct 2, 2018 at 11:51 AM Alexandre (Shura) Iline > wrote: >> From: Rev Kapuganti > >> Sent: Tuesday, October 02, 2018 7:50 PM >> To: Muneer Kolarkunnu > >> Subject: Fwd: Jemmy V2 - question (test-automation, blackbox) >> >> Hello Abdul. This is realated to a question that I have on Jemmy usecase which I posted on Jemmy-dev list. I'm also trying to reach out to you as I haven't heard from the developer mailing list. Any help would be greatly appreciated. >> >> >> Please find the posted below: >> >> >> Hello Jemmy devs - >> >> Firstly great work! I understand that in order to use jemmy v2 - SUT(in my case its a SWING front-end with ORPOS backend) needs to be launched on the same JVM instance that the test runs. I have a question(related to that). Any help/suggestion is greatly appreciated. > > That assumption is absolutely correct. Jemmy v2 is working by requesting information from the AWT component hierarchy, and by calling component methods. Jemmy v2 is accessing the AWT API to get the necessary knowledge about the UI and also to post events to simulate user input or it is using Robot API for the same purpose. > >> >> My app under test needs a config xml(that points to bunch of other config files in the class path) along with JAVA OPTIONS passed to the main class in order to get launched. Currently its a command line launcher through a batch file. How do I approach launching this via Jemmy tests? I see a ClassReference method - startApp, but does it support complex parameters like in my case? > > There are two general ways to run test code and the app code in the same VM: run test code from the application or run the application from the test code. The former would require modifying the original app, which may be harder than to implement the latter. To run the app from test, the most scalable approach is to just run the main class of the application from appropriate lifecycle methods of a test harness, such as TestNG or JUnit. After all, running a Java app is just running a main class with possible preparations and environment setting. > > If, for whatever reason, it is not possible to start the app from the harness setup methods, you can try to modify the batch file of yours by inserting your own class in front of the application main class which, the way I imagine your script, you already have in the line where java binary is called. > >> >> Or do you recommend a different approach where I can run my app with jemmy agent(like solution) so I can reference the java objects from the running app later through my blackbox tests. > > > The other approach to run some auxiliary code in every VM, is called "accessibility hook". That used to work before - I have not tried it in years. It would require changing some property files in the JDK install dir. I would not recommend looking into this approach unless you absolutely have to. > > Shura > >> >> >> Thanks in advance, appreciate any help. >> >> Rev > > >> On Oct 2, 2018, at 8:18 AM, Muneer Kolarkunnu > wrote: >> >> Hi Rev, >> >> We haven?t received this email in jemmy-dev at openjdk.java.net . Can you please confirm you sent email to jemmy-dev at openjdk.java.net only? >> Forwarding this to jemm-dev mailing list. >> >> Shura, >> Rev?s email hasn?t come to jemmy-dev mailing list. I also had same issue when I was sending emails to this mailing list in the initial days and somehow it got corrected. Can you please check. >> Also can you please reply to his query. >> >> Regards, >> Muneer >> >> From: Rev Kapuganti > >> Sent: Tuesday, October 02, 2018 7:50 PM >> To: Muneer Kolarkunnu > >> Subject: Fwd: Jemmy V2 - question (test-automation, blackbox) >> >> Hello Abdul. This is realated to a question that I have on Jemmy usecase which I posted on Jemmy-dev list. I'm also trying to reach out to you as I haven't heard from the developer mailing list. Any help would be greatly appreciated. >> >> >> Please find the posted below: >> >> >> Hello Jemmy devs - >> >> Firstly great work! I understand that in order to use jemmy v2 - SUT(in my case its a SWING front-end with ORPOS backend) needs to be launched on the same JVM instance that the test runs. I have a question(related to that). Any help/suggestion is greatly appreciated. >> >> My app under test needs a config xml(that points to bunch of other config files in the class path) along with JAVA OPTIONS passed to the main class in order to get launched. Currently its a command line launcher through a batch file. How do I approach launching this via Jemmy tests? I see a ClassReference method - startApp, but does it support complex parameters like in my case? >> >> Or do you recommend a different approach where I can run my app with jemmy agent(like solution) so I can reference the java objects from the running app later through my blackbox tests. >> >> >> Thanks in advance, appreciate any help. >> >> Rev > From rev.sdet at gmail.com Tue Oct 2 22:50:49 2018 From: rev.sdet at gmail.com (Rev Kapuganti) Date: Tue, 2 Oct 2018 18:50:49 -0400 Subject: Jemmy V2 - question (test-automation, blackbox) In-Reply-To: References: <7a776958-7015-4e7c-b255-f5b7214ed49b@default> Message-ID: Ok, Got it, Thanks Shura for all the suggestions. Rev On Tue, Oct 2, 2018 at 2:49 PM Alexandre (Shura) Iline < alexandre.iline at oracle.com> wrote: > Rev, > > It is hard for me to answer your questions without knowing the specifics, > sorry. > > From what you are saying, it looks like that you will have to modify more > than one line in the launch script - could be so. > > Shura > > On Oct 2, 2018, at 10:10 AM, Rev Kapuganti wrote: > > Thank you Shura, thats great details. Out of all the options you have > recommended, I believe the below option sounds feasible because of the > complexities and different custom parameters (configs )required for > launching this heavy loaded OR-POS application and also my test automation > framework of choice(Jruby based - runs on JVM). Unfortunately a simple > java invocation of the main class with java_options and application params > wouldn't do it. > > > Preferred option - > > If, for whatever reason, it is not possible to start the app from the > harness setup methods, you can try to modify the batch file of yours by > inserting your own class in front of the application main class which, the > way I imagine your script, you already have in the line where java binary > is called. > > > My question with this option is - My test suite(cucumber) entry point is > a ruby-file( cucumber's env.rb : which creates an instance of Object class) > and it then calls all the tests under the suite directory. I'm also using a > bunch of JARs for doing a bunch of other things(to talk to databases, my > simulation servers, reporting apps and others). I would like to mix in > jemmy here for talking to the GUI of swing app. > > This cucumber suite(since its Jruby) is run on JVM through > command-line(for example: Jruby -S cucumber -p test-profile). Are you > recommending somehow adding this invocation along with the POS app's main > class while launching it through the batch file? > > > > > > > On Tue, Oct 2, 2018 at 11:51 AM Alexandre (Shura) Iline < > alexandre.iline at oracle.com> wrote: > >> *From:* Rev Kapuganti >> *Sent:* Tuesday, October 02, 2018 7:50 PM >> *To:* Muneer Kolarkunnu >> *Subject:* Fwd: Jemmy V2 - question (test-automation, blackbox) >> >> >> Hello Abdul. This is realated to a question that I have on Jemmy usecase >> which I posted on Jemmy-dev list. I'm also trying to reach out to you as I >> haven't heard from the developer mailing list. Any help would be greatly >> appreciated. >> >> Please find the posted below: >> >> >> Hello Jemmy devs - >> >> Firstly great work! I understand that in order to use jemmy v2 - SUT(in >> my case its a SWING front-end with ORPOS backend) needs to be launched on >> the same JVM instance that the test runs. I have a question(related to >> that). Any help/suggestion is greatly appreciated. >> >> >> That assumption is absolutely correct. Jemmy v2 is working by requesting >> information from the AWT component hierarchy, and by calling component >> methods. Jemmy v2 is accessing the AWT API to get the necessary knowledge >> about the UI and also to post events to simulate user input or it is using >> Robot API for the same purpose. >> >> >> My app under test needs a config xml(that points to bunch of other config >> files in the class path) along with JAVA OPTIONS passed to the main class >> in order to get launched. Currently its a command line launcher through a >> batch file. How do I approach launching this via Jemmy tests? I see a >> ClassReference method - startApp, but does it support complex parameters >> like in my case? >> >> >> There are two general ways to run test code and the app code in the same >> VM: run test code from the application or run the application from the test >> code. The former would require modifying the original app, which may be >> harder than to implement the latter. To run the app from test, the most >> scalable approach is to just run the main class of the application from >> appropriate lifecycle methods of a test harness, such as TestNG or JUnit. >> After all, running a Java app is just running a main class with possible >> preparations and environment setting. >> >> If, for whatever reason, it is not possible to start the app from the >> harness setup methods, you can try to modify the batch file of yours by >> inserting your own class in front of the application main class which, the >> way I imagine your script, you already have in the line where java binary >> is called. >> >> >> Or do you recommend a different approach where I can run my app with >> jemmy agent(like solution) so I can reference the java objects from the >> running app later through my blackbox tests. >> >> >> >> The other approach to run some auxiliary code in every VM, is called >> "accessibility hook". That used to work before - I have not tried it in >> years. It would require changing some property files in the JDK install >> dir. I would not recommend looking into this approach unless you absolutely >> have to. >> >> Shura >> >> >> >> Thanks in advance, appreciate any help. >> >> Rev >> >> >> >> On Oct 2, 2018, at 8:18 AM, Muneer Kolarkunnu < >> abdul.kolarkunnu at oracle.com> wrote: >> >> Hi Rev, >> >> We haven?t received this email in jemmy-dev at openjdk.java.net . Can you >> please confirm you sent email to jemmy-dev at openjdk.java.net only? >> Forwarding this to jemm-dev mailing list. >> >> Shura, >> Rev?s email hasn?t come to jemmy-dev mailing list. I also had same issue >> when I was sending emails to this mailing list in the initial days and >> somehow it got corrected. Can you please check. >> Also can you please reply to his query. >> >> Regards, >> Muneer >> >> *From:* Rev Kapuganti >> *Sent:* Tuesday, October 02, 2018 7:50 PM >> *To:* Muneer Kolarkunnu >> *Subject:* Fwd: Jemmy V2 - question (test-automation, blackbox) >> >> >> Hello Abdul. This is realated to a question that I have on Jemmy usecase >> which I posted on Jemmy-dev list. I'm also trying to reach out to you as I >> haven't heard from the developer mailing list. Any help would be greatly >> appreciated. >> >> Please find the posted below: >> >> >> Hello Jemmy devs - >> >> Firstly great work! I understand that in order to use jemmy v2 - SUT(in >> my case its a SWING front-end with ORPOS backend) needs to be launched on >> the same JVM instance that the test runs. I have a question(related to >> that). Any help/suggestion is greatly appreciated. >> >> My app under test needs a config xml(that points to bunch of other config >> files in the class path) along with JAVA OPTIONS passed to the main class >> in order to get launched. Currently its a command line launcher through a >> batch file. How do I approach launching this via Jemmy tests? I see a >> ClassReference method - startApp, but does it support complex parameters >> like in my case? >> >> Or do you recommend a different approach where I can run my app with >> jemmy agent(like solution) so I can reference the java objects from the >> running app later through my blackbox tests. >> >> >> Thanks in advance, appreciate any help. >> >> Rev >> >> >> > From abdul.kolarkunnu at oracle.com Wed Oct 24 06:18:55 2018 From: abdul.kolarkunnu at oracle.com (Muneer Kolarkunnu) Date: Tue, 23 Oct 2018 23:18:55 -0700 (PDT) Subject: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator Message-ID: <6463ebdf-ecae-4a7f-8ae0-f99f00961bf2@default> Hi All, Please review fix for the enhancement: https://bugs.openjdk.java.net/browse/CODETOOLS-7902339 Webrev : http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.00/ Description: There are multiple issues in different L&Fs. In GTK and Motif L&F: There are two JLists, one is to list folders and second one one is to list files, but current JFileChooserOperator implementation didn't consider this, it expects only one JList that is to list files. Windows & Windows Classic L&F: There is no 'Go Home' button, but there is a toggle button to go desktop. In Windows platform 'Go Home' button usually(In metal and nimbus L&F) navigates to Desktop only. Regards, Muneer From alexandre.iline at oracle.com Thu Oct 25 18:18:08 2018 From: alexandre.iline at oracle.com (Alexandre (Shura) Iline) Date: Thu, 25 Oct 2018 11:18:08 -0700 Subject: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator In-Reply-To: <6463ebdf-ecae-4a7f-8ae0-f99f00961bf2@default> References: <6463ebdf-ecae-4a7f-8ae0-f99f00961bf2@default> Message-ID: <48637ACE-590D-4634-A025-9E17E0AB379B@oracle.com> The JFileChooserOperator.java changes look great. 1. You can use @BeforeMethod even with data provider, it seems. There a seem to be a way to pass parameters to @BeforeMethod. Have you tried that? 2. I am worried about hardcoding ?Desktop? even in the tests. That would mean that Jemmy tests only works on English windows. Should we think of localization resource bundles for this case? 3. Please bump minor version Shura > On Oct 23, 2018, at 11:18 PM, Muneer Kolarkunnu wrote: > > Hi All, > > Please review fix for the enhancement: https://bugs.openjdk.java.net/browse/CODETOOLS-7902339 > > Webrev : http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.00/ > > Description: > There are multiple issues in different L&Fs. > In GTK and Motif L&F: > There are two JLists, one is to list folders and second one one is to list files, but current JFileChooserOperator implementation didn't consider this, it expects only one JList that is to list files. > > Windows & Windows Classic L&F: > There is no 'Go Home' button, but there is a toggle button to go desktop. In Windows platform 'Go Home' button usually(In metal and nimbus L&F) navigates to Desktop only. > > Regards, > Muneer > > From abdul.kolarkunnu at oracle.com Mon Oct 29 08:49:25 2018 From: abdul.kolarkunnu at oracle.com (Muneer Kolarkunnu) Date: Mon, 29 Oct 2018 01:49:25 -0700 (PDT) Subject: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator In-Reply-To: <48637ACE-590D-4634-A025-9E17E0AB379B@oracle.com> References: <6463ebdf-ecae-4a7f-8ae0-f99f00961bf2@default> <48637ACE-590D-4634-A025-9E17E0AB379B@oracle.com> Message-ID: <7b1617d5-d01a-4444-b934-ab841d681d6d@default> Hi Shura, Thanks for review, please see inline comments, updated webrev: http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.01/ Regards, Muneer -----Original Message----- From: Alexandre (Shura) Iline Sent: Thursday, October 25, 2018 11:48 PM To: Muneer Kolarkunnu Cc: jemmy-dev at openjdk.java.net Subject: Re: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator The JFileChooserOperator.java changes look great. 1. You can use @BeforeMethod even with data provider, it seems. There a seem to be a way to pass parameters to @BeforeMethod. Have you tried that? >>> Done it, it really reduced lots of code duplication, done similar changes in JInternalFrameOperatorTest.java and JInternalFrameOperatorCloseTest.java tests also. 2. I am worried about hardcoding ?Desktop? even in the tests. That would mean that Jemmy tests only works on English windows. Should we think of localization resource bundles for this case? >>> Changed this to use API FileSystemView.getFileSystemView().getHomeDirectory(). 3. Please bump minor version >>> Done Shura > On Oct 23, 2018, at 11:18 PM, Muneer Kolarkunnu wrote: > > Hi All, > > Please review fix for the enhancement: https://bugs.openjdk.java.net/browse/CODETOOLS-7902339 > > Webrev : http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.00/ > > Description: > There are multiple issues in different L&Fs. > In GTK and Motif L&F: > There are two JLists, one is to list folders and second one one is to list files, but current JFileChooserOperator implementation didn't consider this, it expects only one JList that is to list files. > > Windows & Windows Classic L&F: > There is no 'Go Home' button, but there is a toggle button to go desktop. In Windows platform 'Go Home' button usually(In metal and nimbus L&F) navigates to Desktop only. > > Regards, > Muneer > > From alexandre.iline at oracle.com Mon Oct 29 16:25:37 2018 From: alexandre.iline at oracle.com (Alexandre (Shura) Iline) Date: Mon, 29 Oct 2018 09:25:37 -0700 Subject: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator In-Reply-To: <7b1617d5-d01a-4444-b934-ab841d681d6d@default> References: <6463ebdf-ecae-4a7f-8ae0-f99f00961bf2@default> <48637ACE-590D-4634-A025-9E17E0AB379B@oracle.com> <7b1617d5-d01a-4444-b934-ab841d681d6d@default> Message-ID: <180BA9C2-248B-4F69-AD93-963D22D095F1@oracle.com> Looks good. Do you want me to push it for you? Shura > On Oct 29, 2018, at 1:49 AM, Muneer Kolarkunnu wrote: > > Hi Shura, > > Thanks for review, please see inline comments, updated webrev: http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.01/ > > Regards, > Muneer > > -----Original Message----- > From: Alexandre (Shura) Iline > Sent: Thursday, October 25, 2018 11:48 PM > To: Muneer Kolarkunnu > Cc: jemmy-dev at openjdk.java.net > Subject: Re: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator > > The JFileChooserOperator.java changes look great. > > 1. You can use @BeforeMethod even with data provider, it seems. There a seem to be a way to pass parameters to @BeforeMethod. Have you tried that? >>>> Done it, it really reduced lots of code duplication, done similar changes in JInternalFrameOperatorTest.java and JInternalFrameOperatorCloseTest.java tests also. > 2. I am worried about hardcoding ?Desktop? even in the tests. That would mean that Jemmy tests only works on English windows. Should we think of localization resource bundles for this case? >>>> Changed this to use API FileSystemView.getFileSystemView().getHomeDirectory(). > 3. Please bump minor version >>>> Done > > Shura > >> On Oct 23, 2018, at 11:18 PM, Muneer Kolarkunnu wrote: >> >> Hi All, >> >> Please review fix for the enhancement: https://bugs.openjdk.java.net/browse/CODETOOLS-7902339 >> >> Webrev : http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.00/ >> >> Description: >> There are multiple issues in different L&Fs. >> In GTK and Motif L&F: >> There are two JLists, one is to list folders and second one one is to list files, but current JFileChooserOperator implementation didn't consider this, it expects only one JList that is to list files. >> >> Windows & Windows Classic L&F: >> There is no 'Go Home' button, but there is a toggle button to go desktop. In Windows platform 'Go Home' button usually(In metal and nimbus L&F) navigates to Desktop only. >> >> Regards, >> Muneer >> >> > From abdul.kolarkunnu at oracle.com Tue Oct 30 04:56:29 2018 From: abdul.kolarkunnu at oracle.com (Muneer Kolarkunnu) Date: Mon, 29 Oct 2018 21:56:29 -0700 (PDT) Subject: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator In-Reply-To: <180BA9C2-248B-4F69-AD93-963D22D095F1@oracle.com> References: <6463ebdf-ecae-4a7f-8ae0-f99f00961bf2@default> <48637ACE-590D-4634-A025-9E17E0AB379B@oracle.com> <7b1617d5-d01a-4444-b934-ab841d681d6d@default> <180BA9C2-248B-4F69-AD93-963D22D095F1@oracle.com> Message-ID: <118e6ff9-7fed-4e20-b7f9-88c6da6a0299@default> Yes, please. Changeset : http://cr.openjdk.java.net/~akolarkunnu/7902339/filechooser.txt Regards, Muneer -----Original Message----- From: Alexandre (Shura) Iline Sent: Monday, October 29, 2018 9:56 PM To: Muneer Kolarkunnu Cc: jemmy-dev at openjdk.java.net Subject: Re: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator Looks good. Do you want me to push it for you? Shura > On Oct 29, 2018, at 1:49 AM, Muneer Kolarkunnu wrote: > > Hi Shura, > > Thanks for review, please see inline comments, updated webrev: http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.01/ > > Regards, > Muneer > > -----Original Message----- > From: Alexandre (Shura) Iline > Sent: Thursday, October 25, 2018 11:48 PM > To: Muneer Kolarkunnu > Cc: jemmy-dev at openjdk.java.net > Subject: Re: RFR CODETOOLS-7902339: Handle different look and feels in JFileChooserOperator > > The JFileChooserOperator.java changes look great. > > 1. You can use @BeforeMethod even with data provider, it seems. There a seem to be a way to pass parameters to @BeforeMethod. Have you tried that? >>>> Done it, it really reduced lots of code duplication, done similar changes in JInternalFrameOperatorTest.java and JInternalFrameOperatorCloseTest.java tests also. > 2. I am worried about hardcoding ?Desktop? even in the tests. That would mean that Jemmy tests only works on English windows. Should we think of localization resource bundles for this case? >>>> Changed this to use API FileSystemView.getFileSystemView().getHomeDirectory(). > 3. Please bump minor version >>>> Done > > Shura > >> On Oct 23, 2018, at 11:18 PM, Muneer Kolarkunnu wrote: >> >> Hi All, >> >> Please review fix for the enhancement: https://bugs.openjdk.java.net/browse/CODETOOLS-7902339 >> >> Webrev : http://cr.openjdk.java.net/~akolarkunnu/7902339/webrev.00/ >> >> Description: >> There are multiple issues in different L&Fs. >> In GTK and Motif L&F: >> There are two JLists, one is to list folders and second one one is to list files, but current JFileChooserOperator implementation didn't consider this, it expects only one JList that is to list files. >> >> Windows & Windows Classic L&F: >> There is no 'Go Home' button, but there is a toggle button to go desktop. In Windows platform 'Go Home' button usually(In metal and nimbus L&F) navigates to Desktop only. >> >> Regards, >> Muneer >> >> > From alexandre.iline at oracle.com Tue Oct 30 21:41:05 2018 From: alexandre.iline at oracle.com (alexandre.iline at oracle.com) Date: Tue, 30 Oct 2018 21:41:05 +0000 Subject: hg: code-tools/jemmy/v2: 7902339: Handle different look and feels in JFileChooserOperator Message-ID: <201810302141.w9ULf5HV011992@aojmv0008.oracle.com> Changeset: 93cfbd0e4d48 Author: akolarkunnu Date: 2018-10-29 21:52 -0700 URL: http://hg.openjdk.java.net/code-tools/jemmy/v2/rev/93cfbd0e4d48 7902339: Handle different look and feels in JFileChooserOperator Reviewed-by: shurailine Contributed-by: abdul.kolarkunnu at oracle.com ! src/org/netbeans/jemmy/operators/JFileChooserOperator.java ! src/org/netbeans/jemmy/version_info ! test/org/netbeans/jemmy/operators/FileChooserTest.java ! test/org/netbeans/jemmy/operators/JInternalFrameOperatorCloseTest.java ! test/org/netbeans/jemmy/operators/JInternalFrameOperatorTest.java