we are using red-hat enterprise Linux server 5.3, we run some testcase in red-hat how could find the start and end time of the testcases in server,please guide me.
2 Answers
#!/bin/bash
date
./your-script-to-run-the-test-cases
date
Alternatively, if you want to just see how long it took to run, use time
:
time ./your-script-to-run-the-test-cases
-
-
32.876u 6.018s 0:49.19 79.0% 0+0k 0+0io 0pf+0w I got this statement which one is execution time Sep 27, 2012 at 8:34
If you are looking to find time that was taken for a test case you can do the following :-
(time sh -c "sh my_script_for_test_case_execution") 2>&1 | grep "real" | awk '{print $(NF)}'
This data will give you the exact time consumed for test case execution in min.sec format.