I am a newbie in automation, and I need help in writing this.
before(:each) do
# test start time
# video start time :00:00:00
setup function
end
it "test case 1" do
#perform action1
#perform action2 ...
end
it "test case 2" do
#perform action1
#perform action2 ...
end
after(:each) do
teardown function
#test end time
#video end time : 00:00:57
end
My .rb file looks like this where i need to print the time before and after test execution
Idea:
When the batch run script starts execution video also starts recording simultaneously so the time printed by the script should match with video play time video playtime starts from 00:00:00 so when the first test case starts execution time displayed should be 00:00:00 similarly the second test case will get executed at say 00:00:57 and then the next at 00:01:46
that way i can match which test case got executed at what timeline of the video
Final Output:
Video start time: 00:00:00
Video end time : 00:00:57
Video start time: 00:00:57
Video end time: 00:01:40
I have to write it in ruby. How can I achieve this. Should I be using a timer??