Get-BeJob

Gets information about a job.

Get-BeJob
    -Connection <Connection>
    -JobId <String>

Description

The Get-BeJob cmdlet queries a job for its current status and some more information.

You may use this command to poll a job until it completes.

Example

The following example shows how to run a test suite, return its job ID and query the job for information.

$suiteId = 1

# Start suite
Write-Host -NoNewline "Starting suite run... "
$startSuiteResult = Start-BeSuiteRun -Connection $connection -SuiteId $suiteId
$jobId = $startSuiteResult.jobId
Write-Host "Done (Job-ID: $jobId)"

$jobInfo = Get-BeJob -Connection $connection -JobId $jobId
Write-Host "JobId: $jobInfo.JobId"
Write-Host "Status: $jobInfo.Status"
Write-Host "Message: $jobInfo.Message"

Parameters

-Connection

Pass the connection-object returned by the Connect-BeInstance cmdlet.

Type:Connection
Mandatory:Yes
Position:Named
Default Value:None

-JobId

The ID of the job.

Type:String
Mandatory:Yes
Position:Named
Default Value:None

Output

The cmdlet outputs a Job-object that contains the following attributes.

NameData TypeDescription
JobIdStringThe ID of the job.
StatusStringThe current status of the job. This can be one of the following values:
– New
– Queued
– Running
– Succeeded
– Failed
– Canceled
MessageStringDepending on the outcome of the job, there may be a message like an error message. This attribute can also be empty.
Table of Contents