Skip to content
QiTASC.com / Data Steps and Compound Steps /
Expect an Upload/Download's Occurrence Steps
/ .. /
Expect an Upload/Download's...





Expecting an Upload/Download's Occurrence Step

The Upload and Download Compound Steps are associated with expectation Steps. These test whether the upload/download enters the specified state within a given timeout. Using this Step blocks the test case execution until the desired state is reached. If the state is not reached within the timeout, the expect Step fails.

Expect Download to Finish

This Step confirms that the download initiated from the Compound Step finishes within a timeout period.

Syntax

1
2
within <time Number> <timeUnit TimeUnit>, <name Identifier> expects download
    <downloadName Identifier> to finish

Parameters

  • time - The number of time units

  • timeUnit - One of second, seconds, minute or minutes

  • name - The name assigned to the phone downloading data

  • downloadName - The name assigned to the download session

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Given a phone as A:
  *  of type Android

And deferred, within 30 seconds, A disables data connections
And within 30 seconds, A enables data connections

And A starts a download from "http://testdata.qvie.qitasc.com/data/400MB" as MYDOWNLOAD:
  *  it stops after 10 seconds

And within 15 seconds, A expects download MYDOWNLOAD to finish

Note: If the download does not finish in the specified timeframe, the expect Step will fail.

Expect Upload to Finish

This Step confirms that the upload initiated from the Compound Step finishes within a timeout period.

Syntax

1
2
within <time Number> <timeUnits TimeUnit>, <name Identifier> expects upload
    <uploadName Identifier> to finish

Parameters

  • time - The number of time units

  • timeUnits - One of second, seconds, minute or minutes

  • name - The name assigned to the phone uploading data

  • uploadName - The name assigned to the upload session

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Given a phone as A:
  *  of type Android

And deferred, within 30 seconds, A disables data connections
And within 30 seconds, A enables data connections

And A starts uploading random data to "http://testdata.qitasc.com/upload" as Upload1:
  *  it stops after 11 kB
  *  it allows 100 reconnects

And within 40 seconds, A expects upload Upload1 to finish

This Step is eligible for:

  • Timed

  • Deferred

Note: If the upload does not finish in the specified timeframe, the expect Step will fail.