Marathon JavaDriver - AUT source code as an external library

175 views
Skip to first unread message

Garrett Leeson

unread,
Oct 31, 2019, 11:24:17 PM10/31/19
to Marathon Java GUI Testing
I'm looking to add the Marathon JavaDriver to my TestNG framework to add gui testing to our solution. As I'm not working on developing the AUT but strictly tasked with the testing of it, I don't have access to the source code solution but I am able to add it as a dependency through an internal maven repository. Is this sufficient access to the source code for the JavaDriver to work? I plan on creating test classes with the locators that extend the source swing page classes. 

Dakshinamurthy Karra

unread,
Oct 31, 2019, 11:56:00 PM10/31/19
to marathon...@googlegroups.com

Java driver is on maven repo. 

On Fri, 1 Nov 2019 at 8:54 AM, Garrett Leeson <garrett...@gmail.com> wrote:
I'm looking to add the Marathon JavaDriver to my TestNG framework to add gui testing to our solution. As I'm not working on developing the AUT but strictly tasked with the testing of it, I don't have access to the source code solution but I am able to add it as a dependency through an internal maven repository. Is this sufficient access to the source code for the JavaDriver to work? I plan on creating test classes with the locators that extend the source swing page classes. 

--
Looking for professional help with your Marathon projects?
Go visit: http://marathontesting.com
---
You received this message because you are subscribed to the Google Groups "Marathon Java GUI Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marathon-testi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marathon-testing/f980461c-5ec5-41d4-a0d6-4c32fa8c8f12%40googlegroups.com.
--
Sent from Gmail Mobile on iPhone.

Martin-Pierre Roy

unread,
Nov 2, 2019, 2:42:50 AM11/2/19
to Marathon Java GUI Testing
Hi Garrett,

     If you are familiar with Selenium, WebDriver.io or any web driver solution you will see that the JavaDriver is no different. It is intended for blackbox testing therefore no access to the code is needed. To use the JavaDriver you will simply need to load the JavaAgent as part of the launching arguments to your Java application. Once the javaagent is loaded in the scope of your Java based application, the JavaDriver (or any W3C compliant webdriver) allow you to interact with the user interface either locally of on a remote computer.

     The only reason why you would want to have access to the source would be to ease the retrieval of identifier for your web element locators. But this can be accomplish by using a Swing spy/inspector. 
      
      You might want to look into MarathonITE that offers an amazing suite of tools to create your test, tests suites, record and play, test runners, batch runner etc. which underneth all relies on the JavaDriver.  It would make you life easy at creating your test, running them and providing reporting.

Hope this helps,
MP

Garrett Leeson

unread,
Nov 2, 2019, 2:42:51 AM11/2/19
to Marathon Java GUI Testing
https://marathontesting.com/javadriver/ In the last sentence of the first paragraph it's stated, "Marathon JavaDriver can also be used to perform functional testing provided you are well versed with Java and have access to source code of the application." I was asking if I have to put the marathon tests in the source code or if I can extend the source code and put the marathon tests there. I'm already aware that the java driver is hosted on the maven repository, I was referring to how I was going to 'get my AUT source code'.


On Thursday, October 31, 2019 at 11:56:00 PM UTC-4, Dakshinamurthy Karra wrote:
Java driver is on maven repo. 

On Fri, 1 Nov 2019 at 8:54 AM, Garrett Leeson <garret...@gmail.com> wrote:
I'm looking to add the Marathon JavaDriver to my TestNG framework to add gui testing to our solution. As I'm not working on developing the AUT but strictly tasked with the testing of it, I don't have access to the source code solution but I am able to add it as a dependency through an internal maven repository. Is this sufficient access to the source code for the JavaDriver to work? I plan on creating test classes with the locators that extend the source swing page classes. 

--
Looking for professional help with your Marathon projects?
Go visit: http://marathontesting.com
---
You received this message because you are subscribed to the Google Groups "Marathon Java GUI Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marathon...@googlegroups.com.

Martin-Pierre Roy

unread,
Nov 2, 2019, 11:13:55 AM11/2/19
to Marathon Java GUI Testing

I am not certain what is intended here by that sentence. The only module that needs to include Java driver code is the test module. You need to include a driver, the JavaDriver or any other driver (like selenium) that implements the w3c specification. The included piece of code is required to communicate with the java agent, which is the component the interacts with you application and exposes the Json wire service.  

I use the driver on a daily basis without having access to the code of the AUT. You need to load both the java agent and a swing spy (for instance swinginspector). Once your tests are written you can remove the entry for the spy module. These gets loaded in the scope you the AUT at runtime through vm arguments. 

java -Dmarathon.mode=playing -javaagent:"<PATH_TO_AGENT>/marathon-java-agent-5.x.y.z.jar"=24444 -agentpath:<PATH_TO_INSPECTOR>/i386/libswing-inspector-agent.so -jar  your_app.jar

The Marathon Java agent can be compiled from the open source project. With that, when your application with be launched the port (in this case 24444) will be open and accessible by any web driver to interact with you application. 

Once test are written, the can be invoke through TestNG and with the proper plugin, maven test will start them as any other test. The MarathonITE does make life easier however since it provides you all the tools, so you only need to focus on the tests themselves. 

If you want to see example of that, simply clone the repo of the open source, under marathon-java the projects marathon-java-driver and marathon-java-agent unit tests make tons of use of the agent. 
Reply all
Reply to author
Forward
0 new messages