G-wagon
9 years agoRegular Contributor
Batch Job Testing
Hi all
I am relatively new to TestComplete. I'll be primarily relying on record and play option as I am not very familiar with the coding side of things but any suggestions are welcome.
A quick overview on what my application under test do :
My application under test has to run a specific batch job. Once the job is kicked off it then moves to 'Jobs' tab which displays the batch job name/id and its state (eg: 'running', 'could not start' or 'failed'). Once the job is finished running it moves to 'Finished Jobs' tab where the job state is updated to 'Finished'.
Stuff I want TC to do :
I wish to design a test where once the batch job is started
Condition 1 - It finds the specific job with its job id in 'jobs' tab and checks for its state (eg: 'running', 'could not start' or 'failed').
Condition 2 - If the job state is anything else other than 'running' the test fails
Condition 3 - If the job state is 'running' it waits for while and again looks at that job id and its state
Condition 4 - Condition 3 is a loop unless TC could not find the job id in 'Jobs' tab' so at this stage it will then go to 'Finished Jobs' tab to check for the Job Id. If found, then the test will be Passed. Attached screenshot may help to understand this better.
I think the above can be achieved through coding easily but I am not too familiar with codes therefore I was wondering if someone can help me to design this with record and play. However if some can contribute with the sample code to design the above that too will be highly appreciated. Thanks
I am relatively new to TestComplete. I'll be primarily relying on record and play option as I am not very familiar with the coding side of things but any suggestions are welcome.
A quick overview on what my application under test do :
My application under test has to run a specific batch job. Once the job is kicked off it then moves to 'Jobs' tab which displays the batch job name/id and its state (eg: 'running', 'could not start' or 'failed'). Once the job is finished running it moves to 'Finished Jobs' tab where the job state is updated to 'Finished'.
Stuff I want TC to do :
I wish to design a test where once the batch job is started
Condition 1 - It finds the specific job with its job id in 'jobs' tab and checks for its state (eg: 'running', 'could not start' or 'failed').
Condition 2 - If the job state is anything else other than 'running' the test fails
Condition 3 - If the job state is 'running' it waits for while and again looks at that job id and its state
Condition 4 - Condition 3 is a loop unless TC could not find the job id in 'Jobs' tab' so at this stage it will then go to 'Finished Jobs' tab to check for the Job Id. If found, then the test will be Passed. Attached screenshot may help to understand this better.
I think the above can be achieved through coding easily but I am not too familiar with codes therefore I was wondering if someone can help me to design this with record and play. However if some can contribute with the sample code to design the above that too will be highly appreciated. Thanks