-3

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 2

1
#!/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
2
  • 32.876u 6.018s 0:49.19 79.0% 0+0k 0+0io 0pf+0w Sep 27, 2012 at 8:33
  • 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
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .