Hello everyone, i decided to post this as i am in the middle of wrapping a library to automate UI Testing and Unit testing, i have figured a lot of the needed things and i am now able to install and launch a test application using B4J, the applications gets installed and deployed on my Android phone (It is possible to test B4i apps, but not tested yet).
The library i am wrapping is Appium http://appium.io/ there is a bit of set up that needs to be done, but once everything is set up, it runs fantastic.
The purpose of this library is to automate Application testing, combined with TestNG it becomes a great tool to test cases, once i figure everything out I will post the library and explain why i decided to research and wrap this library.
For now i'am stuck trying to figure out how to go around defining the test methods within the library but at the same time to define them as @test methods, this is an annotation from the TestNG jar file, and every method defined like this is run and the results recorded in an html file automatically generated by the library, this html is a test report that records which test methods passed and which ones failed. At the moment i'am only able run this tests from within Eclipse.
This is where I need help, i know B4X doesn't allow us to use annotations like this @test, it would be great if we were able to, but that's probably a topic for some other time.
What i am trying to figure out is how to accomplish this somehow in B4J. My library contains 3 classes, one class is a TestListener which implements ITestListener from TestNG jar file, this class gets called everytime a test method is performed and the library asserts whether the test passed or failed.
Again in order for the test methods to be included in the test cases they need to have the @test annotation at the beginning of each method sub.
Anyone has any ideas on how i should go about this, this is the one thing that is keeping me from finalizing this library. One thing I tried is declaring the test method with inline Java and this seems to work but it will not work for the methods where the appium driver and capabilities need to be initialized and instantiated first, besides the idea of this is to have everything working without having to type any inline java code.
Any thoughts, ideas, anyone....?
Thanks,
Walter
The library i am wrapping is Appium http://appium.io/ there is a bit of set up that needs to be done, but once everything is set up, it runs fantastic.
The purpose of this library is to automate Application testing, combined with TestNG it becomes a great tool to test cases, once i figure everything out I will post the library and explain why i decided to research and wrap this library.
For now i'am stuck trying to figure out how to go around defining the test methods within the library but at the same time to define them as @test methods, this is an annotation from the TestNG jar file, and every method defined like this is run and the results recorded in an html file automatically generated by the library, this html is a test report that records which test methods passed and which ones failed. At the moment i'am only able run this tests from within Eclipse.
This is where I need help, i know B4X doesn't allow us to use annotations like this @test, it would be great if we were able to, but that's probably a topic for some other time.
What i am trying to figure out is how to accomplish this somehow in B4J. My library contains 3 classes, one class is a TestListener which implements ITestListener from TestNG jar file, this class gets called everytime a test method is performed and the library asserts whether the test passed or failed.
Again in order for the test methods to be included in the test cases they need to have the @test annotation at the beginning of each method sub.
Anyone has any ideas on how i should go about this, this is the one thing that is keeping me from finalizing this library. One thing I tried is declaring the test method with inline Java and this seems to work but it will not work for the methods where the appium driver and capabilities need to be initialized and instantiated first, besides the idea of this is to have everything working without having to type any inline java code.
Any thoughts, ideas, anyone....?
Thanks,
Walter