EndTime Property (ATest)

Version 7,2024/v13

Returns the time that this test ended.

Syntax

 [ dateEnd = ] Object.EndTime

The EndTime property syntax has the following parts:

 

Name

Type

Description

Object

ATest

ATest object

dateEnd

DateTime

A floating number (Double) specifying the time that this test ended.

Comments

EndTime is the time after the test get executed before all OnEndTest events were called.

In ATEasy 2024/v13 this property was updated to return the time accurate to 100 nSec from 1 Sec in earlier versions.

Use the FormatLogString with aFormatLogAddDuration to display the test duration column in the test log (ATEasy 2024/v13).

Example

The following code is OnEndTest event of the program, which prints the time taken for each test:

 

Procedure OnEndTest(): Void Public Compile ! Occurs after a program test has completed.

--------------------------------------------------------------------------------

s: String

d: Double

dtmOneSec: DateTime = "12:00:01 AM"

{

if Test.EndTime=Test.StartTime

print "Time taken for this test : less than one sec."

else

d=(Test.EndTime-Test.StartTime)/dtmOneSec

print "Time taken for this test : "; Format(d, "9") + " sec"

endif

}

Applies to

ATest

See Also

StartTime, DataTime data type, SDate, STime, FormatDateTime,  ParseDateTime, VarChangeType