forked from mobile-dev-inc/maestro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature - Add Status and Time to report.xml (mobile-dev-inc#1520)
* add status to testcase * add status and duration to cloud test report * address PR issues
- Loading branch information
Showing
8 changed files
with
99 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
maestro-cli/src/main/java/maestro/cli/model/RunningFlow.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package maestro.cli.model | ||
|
||
import maestro.cli.api.UploadStatus | ||
import kotlin.time.Duration | ||
|
||
data class RunningFlows( | ||
val flows: MutableSet<RunningFlow> = mutableSetOf(), | ||
var duration: Duration? = null | ||
) | ||
|
||
data class RunningFlow( | ||
val name: String, | ||
var status: UploadStatus.Status? = null, | ||
var startTime: Long? = null, | ||
var duration: Duration? = null, | ||
var reported: Boolean = false | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package maestro.cli.util | ||
|
||
import kotlin.math.roundToLong | ||
import kotlin.time.Duration | ||
import kotlin.time.Duration.Companion.seconds | ||
|
||
object TimeUtils { | ||
|
||
fun durationInSeconds(startTimeInMillis: Long?, endTimeInMillis: Long?): Duration { | ||
if (startTimeInMillis == null || endTimeInMillis == null) return Duration.ZERO | ||
return ((endTimeInMillis - startTimeInMillis) / 1000f).roundToLong().seconds | ||
} | ||
|
||
fun durationInSeconds(durationInMillis: Long): Duration { | ||
return ((durationInMillis) / 1000f).roundToLong().seconds | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters