Traditional and time consuming approaches of automation script development are snubbed, new generation techniques are being looked up for multiple reasons and benefits.
Automation teams and organisations want to improve the productivity of their test automation engineers there by result in early completion of test automation script development phase with minimal efforts. They have embarked in to code generation strategies and techniques to create test automation scripts on the fly.
The test automation engineers need to just configure the scripts, so that the scripts get generated as per the requirements given to develop the automated test case.
Let us now see some of the internals for this code generation to work for Oracle Application Testing Suite
Whenever a script is created using OpenScript IDE, you can see a huge list of files and folders are generated automatically ( refer below screenshot ). The actual automation script is stored in a file called “script.java” and one other important file which is needed to execute the automation script is a file with extension “.jwg” as marked in below screenshot.
In the above list of files, you can manage to generate or duplicate all files / folders and make a meaningful automation script of Oracle Application Testing Suite except for the file with an extension “.jwg”. This is the first case where you would look for a utility that can compile the generated script dynamically.
Secondly, whenever the script modification is minimal you don’t want to spend more time to open OpenScript IDE and make changes, rather you feel editing “script.java” in a simple notepad is more user friendly and consumes less time, but unfortunately the “.jwg” file does not get updated automatically when changes are made to script.java file using a normal text file editor and not with OpenScript IDE.
osclti.bat file is the only utility which can address above 2 cases to compile and generate “.jwg” files.
Lets now get in to the most exciting part, i.e. the list of commands to be generate the most vital file with extension “.jwg”
|1||Compile single script.||c:\OracleATS\openScript\osclti.bat -script <path of automation script>||c:\OracleATS\openScript\osclti.bat -script “C:\OracleATS\OFT\HelloWorld”|
|2||Compile scripts in bulk.||c:\OracleATS\openScript\osclti.bat -rootFolder <folder path containing multiple scripts>||c:\OracleATS\openScript\osclti.bat -rootFolder “C:\OracleATS\OFT\ChildScripts\”|
|3||Compile scripts with log file.||c:\OracleATS\openScript\osclti.bat -rootFolder <folder path containing multiple scripts> -logFile <path to log file>||c:\OracleATS\openScript\osclti.bat -rootFolder “C:\OracleATS\OFT\ChildScripts\” -logFile “C:\OracleATS\OFT\compileinfo.txt”|
|4||Compile scripts in bulk and continue even if some scripts fail to compile in between.||c:\OracleATS\openScript\osclti.bat -rootFolder <folder path containing multiple scripts> -logFile <path to log file> -stopBatch||c:\OracleATS\openScript\osclti.bat -rootFolder “C:\OracleATS\OFT\ChildScripts\” -logFile “C:\OracleATS\OFT\compileinfo.txt” -stopBatch|
There are couple more options if you would like to explore, you can either refer to below screenshot or run the following command @ c:\OracleATS\openScript folder
Command: c:\OracleATS\openScript\osclti.bat compile -help
In case you have any difficulties, please feel free to reach out to us in form of comments, we would be more than happy to help you.