Login
Syntax
void Login(string serverMachine, int serverPort, string username, string password, string domain)
Parameters
Type | Name | Description |
---|---|---|
string | serverMachine | IP address or host name of the Quali Server machine, i.e.: 192.100.1.2 or QsServer. |
string | serverPort | The TCP port that the Portal is configured to work on. |
string | username | Username to login with. |
string | password | Specify the user's login password. |
string | domain | Specify the name of the domain. |
Example
QualiAPI.QualiAPI api = new QualiAPI.QualiAPI();
api.Login("localhost", 9000, "admin", "admin", "Global");
SecureLogon
Syntax
void SecureLogon(string serverMachine, int serverPort, string token, string domain)
Parameters
Type | Name | Description |
---|---|---|
string | serverMachine | IP address or host name of the Quali Server machine, i.e.: 192.100.1.2 or QsServer. |
string | serverPort | The TCP port that the Portal is configured to work on. |
string | token | Token to login with. |
string | domain | Specify the name of the domain. |
Example
QualiAPI.QualiAPI api = new QualiAPI.QualiAPI();
api.SecureLogon("localhost", 9000, "authToken", "Global");
Get Available Suite Templates
Syntax
void GetAvailableSuiteTemplates(out string[,] templates)
Parameters
Type | Name | Description |
---|---|---|
out string[,] | templates | Provides an array of available automation suites.
Each suite is composed of: Name, Description, Owner, Create Date, Modification Date.
The name attribute indicates the name of the suite template.
The description attribute indicates the description of the suite.
The owner attribute indicates the name of the user who created the suite.
The create date attribute indicates the create date and time of the suite.
The modification date attributes indicate the last modification date and time.
|
Example
string [,] templates;
api.GetAvailableSuiteTemplates(out templates);
Get Suite Template Details
Syntax
void GetSuiteTemplateDetails(string suiteTemplateName, out string description, out string type, out string owner, out DateTime createDate, out DateTime modificationDate, out EmailNotifications emailNotifications, out double removeJobsFromQueueAfter, out bool endReservationOnEnd, out string[,] jobsDetails, out string[,] jobExecutionServers, out string[,] topologyGlobalInputs, out string[,] topologyRequirementsInputs, out string[,] topologyAdditionalInputs, out string[,] jobsTestPaths, out string[,] jobsTestParameters)
Parameters
Type | Name | Description |
---|---|---|
string | Suite Template Name | the name of the suite template that is used as a container for the suite |
out string | Description | Displays the automation suite description. |
out string | Type | Indicates the automation suite type. |
out string | Owner | Indicates the name of the user who created the automation suite. |
out DateTime | Create Date | Indicates the create date and time of the automation suite. |
out DateTime | Modification Date | Indicates the last update date and time of the automation suite. |
out string | Email Notifications | Indicates notification trigger settings: None, Errors, Suite and Errors, or All. |
out int | Remove Jobs From Queue After |
Indicates the number of minutes for the suite's execution queue timeout. Suites are automatically removed from the queue upon timing out.
-1 Indicates that queue timeout is disabled.
|
out bool | End Reservation On End | Indicates if the suite's reservation was set to end automatically upon execution completion. |
out string[,] | Jobs Details | Output is a 9 column matrix with Job Index, Name, Description, Logging Profile, Estimated Duration, Stop On Fail, Stop On Error, Topology Name, and Duration Time Buffer as the column headings.
The Index column will display a run of unique numbers.
The suite Name column indicates the name of the parent automation suite.
The Name column indicates the name of each job.
The Description column indicates the description of each job.
The Logging Profile column indicates the selected logging profile for this job. (None, All, Results, Measurements and Results)
The Estimated Duration column Indicates the number of minutes entered as the job's estimated duration.
-1 indicates that the duration will be calculated automatically according to the test durations.
The Stop On Fail column indicates whether the job was set to stop execution if any of its tests failed.
The Stop On Error column indicates whether the job was set to stop execution if any of its tests ended with an error.
The Topology Name column indicates the name of attached topology.
Duration Time Buffer indicates the number of minutes to be added to the duration estimation.
|
out string[,] | Job Execution Servers | Indicates the execution servers for each job
Output is a two column matrix with Job Index and Execution Server as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
If a job has multiple execution servers, there will be a row with the same index value for each required execution server.
|
out string[,] | Topology Global Inputs | Indicates the topology’s input parameters and parameter values.
Output is a four column matrix with Job Index, Name, Value, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Topology Requirements Inputs | Indicates requirements for specific topology resources.
Output is a six column matrix with Job Index, Resource Path, Name, Value, Type, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix. The Resource Path column indicates the full path to the added topology resources.
The Type column indicates whether the Name and Value fields refer to resource model, quantity, or attribute.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Topology Additional Inputs | Indicates additional resource input parameters and values for the attached topology.
Output is a five column matrix with Job Index, Resource Path, Name, Value, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Resource Path column indicates the full path to the added topology resources.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Jobs Test Paths | Provide the full path to each of the job's tests.
Output is a four column matrix with Job Index, Test Index, Test Path and Test Estimated Duration as the column headers.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Test Index column should be a run of unique numbers that specifies the order of the tests. The test index will be used as the test identifier in the Test Parameters input matrix.
The test path column should contain the full details about the location of the test, for example: TestShell\Tests\Shared\Validation\TestCase1.
The Test Estimated Duration is the estimated number of minutes for the execution of the test, This value will be used to calculate the job duration.
|
out string[,] | Jobs Test Parameters | Parameter information for each of the job's tests.
Output is a four column matrix with Job Index, Test Index, Parameter Name and Parameter Value as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Test Index column corresponds to the value in the Test Paths matrix.
Tests with multiple parameters will have a row for each parameter, with the same Test Index value over multiple rows.
|
out string | Existing Reservation ID | Specify existing reservation ID to use for the created suite.
This will only be possible for suites with one job and no topologies.
Note that the system doesn’t validate the number of jobs attached to the same reservation id. Validation if needed should be applied by the clients of the API.
|
Example
string description, type, owner;
DateTime createDate, modificationDate;
EmailNotifications emailNotifications;
double removeJobsFromQueueAfter;
bool endReservationOnEnd;
string[,] jobsDetails, jobExecutionServers, topologyGlobalInputs, topologyRequirementsInputs, topologyAdditionalInputs, jobsTestPaths, jobsTestParameters;
api.GetSuiteTemplateDetails("testcase 10", out description, out type, out owner, out createDate, out modificationDate, out emailNotifications, out removeJobsFromQueueAfter, out endReservationOnEnd, out jobsDetails, out jobExecutionServers, out topologyGlobalInputs, out topologyRequirementsInputs, out topologyAdditionalInputs, out jobsTestPaths, out jobsTestParameters);
Enqueue Custom SuiteEnqueue Custom Suite
Syntax
void EnqueueCustomSuite(string suiteTemplateName, string suiteName, string description, string type, EmailNotifications emailNotification, double removeJobsFromQueueAfter, bool endReservationOnEnd, string[,] jobsDetails, string[,] jobExecutionServers, string[,] topologyGlobalInputs, string[,] topologyRequirementsInputs, string[,] topologyAdditionalInputs, string[,] jobsTestPaths, string[,] jobsTestParameters, string existingReservationId, out string suiteId)
Parameters
Type | Name | Description |
---|---|---|
string | Suite Template Name | Specify the name of the suite template to use as a container for the suite. Empty value indicates an adHoc suite. |
string | Suite Name | Specify the name of the suite template to use as a container for the suite. Empty value indicates an adHoc suite. |
string | Description | Specify the automation suite description. |
string | Type | Specify the automation suite type. Default value: TestShell |
string | Email Notifications | Specify notification trigger settings: None, Errors Only, Suite and Errors, or All. |
int | Remove Jobs From Queue After | Indicates the number of minutes for the suite's execution queue timeout. Suites are automatically removed from the queue upon timing out. -1 Indicates that queue timeout is disabled. |
bool | End Reservation On End | Specify if the suite's reservation should end automatically upon execution completion. |
string[,] | Jobs Details | Input is an 9 column matrix with Job Index, name, Description, Logging Profile, Estimated Duration, Stop On Fail, Stop On Error, Topology Name, and Duration Time Buffer as the column headings.
The Index column will display a run of unique numbers.
The Suite Name column indicates the name of the parent automation suite.
The Name column indicates the name of each job.
The Description column indicates the description of each job.
The Logging Profile column indicates the selected logging profile for this job. (None, All, Results, Measurements and Results)
The Estimated Duration column Indicates the number of minutes entered as the job's estimated duration.
-1 indicates that the duration will be calculated automatically according to the test durations.
The Stop On Fail column indicates whether the job was set to stop execution if any of its tests failed.
The Stop On Error column indicates whether the job was set to stop execution if any of its tests ended with an error.
The Topology Name column indicates the name of attached topology.
Duration Time Buffer indicates the number of minutes to be added to the duration estimation.
|
string[,] | Job Execution Servers | Input should be a two column matrix with Job Index and Execution Server as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
In the Job Execution Server column, specify the selected execution server that ran the job.
If a job has multiple execution servers, there will be a row with the same index value for each required execution server.
|
string[,] | Topology Global Inputs | Provide an optional list of input parameters and parameter values for the attached topology.
Input should be a four column matrix with Job Index, Name, Value, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
string[,] | Topology Requirements Inputs | Specify requirements for specific resources that must be included in the topology (Optional).
Input should be a six column matrix with Job Index, Resource Path, Name, Value, Type, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Resource Path column indicates the full path to the added topology resources.
The Type column indicates whether the Name and Value fields refer to resource model, quantity, or attribute.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
string[,] | Topology Additional Inputs | Specify an optional list of additional input parameters and values for the attached topology.
Input is a five column matrix with Job Index, Resource Path, Name, Value, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Resource Path column indicates the full path to the added topology resources.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
string[,] | Jobs Test Paths | Specify the full path to each of the job's tests.
Input is a four column matrix with Job Index, Test Index, Test Path and Test Estimated Duration.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Test Index column should be a run of unique numbers that specifies the order of the tests. The test index will be used as the test identifier in the Test Parameters input matrix.
The test path column should contain the full details about the location of the test, for example: TestShell\Tests\Shared\Validation\TestCase1.
The Test Estimated Duration is the estimated number of minutes for the execution of the test, This value will be used to calculate the job duration.
|
string[,] | Jobs Test Parameters | Specify parameter information for each of the job's tests.
Input is a four column matrix with Job Index, Test Index, Parameter Name and Parameter Value as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Test Index column corresponds to the value in the Test Paths matrix.
Tests with multiple parameters will have a row for each parameter, with the same Test Index value over multiple rows.
|
string | Existing Reservation ID | Specify existing reservation ID to use for the created suite.
This will only be possible for suites with one job and no topologies.
Note that the system doesn’t validate the number of jobs attached to the same reservation id. Validation if needed should be applied by the clients of the API.
|
out string | Suite Id | The ID of the automation suite that was created. |
Example
string suiteId;
api.EnqueueCustomSuite("", "Ad Hoc 1", "This is a one time network test", "TestShell", EmailNotifications.ErrorsOnly, 5, true,
// Jobs Details
new string[,] { { "Job Index", "Name", "Description", "Logging Profile", "Estimated Duration", "Stop On Fail", "Stop On Error", "Topology Name", "Duration Time Buffer"},
{ "1", "job1", "", "None", "5", "false", "false", "", "10" } },
// Job Execution Servers
new string[,] { { "Job Index", "Execution Server"} },
//Topology Global Inputs
new string[,] { {"Job Index", "Name", "Value", "Possible Values"} },
//Topology Requirements Inputs
new string[,] { {"Job Index", "Resource Path", "Name", "Value", "Type", "Possible Values" } },
// Topology Additional Inputs
new string[,] { { "Job Index", "Resource Path", "Name", "Value", "Possible Values" } },
// Job Test Paths
new string[,] { {"Job Index", "Test Index", "Test Path", "Test Estimated Duration" },
{"1", "1", "TestShell\\Tests\\Shared\\TestWithInputs", "5" }},
// Job Test Parameters
new string[,] { {"Job Index", "Test Index", "Parameter Name", "Parameter Value" },
{ "1", "1", "InStr", "a"},
{ "1", "1", "InNum", "1"},
{ "1", "1", "InStrVect", "['b', 'c', 'd']"},
{ "1", "1", "InNumVect", "[2, 3, 4]"},
{ "1", "1", "InStrMat", "['e', 'f', 'g';'h', 'i', 'j';]"},
{ "1", "1", "InNumMat", "[5, 6, 7;8, 9, 10;]"}},
null, out suiteId);
Output
d071cd61-f958-4002-8149-a433c6fc458a
Get Suite Details
Syntax
void GetSuiteDetails(string suiteId, out string suiteTemplateName, out string suiteName, out string description, out string type, out string owner, out double removeJobsFromQueueAfter, out bool endReservationOnEnd, out string[,] jobsDetails, out string[,] jobExecutionServers, out string[,] topologyGlobalInputs, out string[,] topologyRequirementsInputs, out string[,] topologyAdditionalInputs, out string[,] jobsTestDetails, out string[,] jobsTestParameters, out string suiteStatus, out string suiteResult, out int remainingJobs, out DateTime startTime, out DateTime endTime)
Parameters
Type | Name | Description |
---|---|---|
string | Suite Id | Specify the ID of the automation suite. |
out string | Suite Template Name | the name of the suite template that is used as a container for the suite |
out string | Suite Name | Indicates the name of the automation suite. |
out string | Description | Displays the automation suite description. |
out string | Type | Indicates the automation suite type. |
out string | Owner | Indicates the name of the user who created the automation suite. |
out string | Email Notifications | Indicates notification trigger settings: None, Errors, Suite and Errors, or All. |
out int | Remove Jobs From Queue After | Indicates the number of minutes for the suite's execution queue timeout. Suites are automatically removed from the queue upon timing out.
-1 Indicates that queue timeout is disabled.
|
out bool | End Reservation On End | Indicates if the suite's reservation was set to end automatically upon execution completion. |
out string[,] | Jobs Details | Output is an 11 column matrix with Job Index, Name, Description, Logging Profile, Estimated Duration, Stop On Fail, Stop On Error, Topology Name, Duration Time Buffer, Job State and Job Result as the column headings.
The Index column will display a run of unique numbers.
The Suite Name column indicates the name of the parent automation suite.
The Name column indicates the name of each job.
The Description column indicates the description of each job.
The Logging Profile column indicates the selected logging profile for this job. (None, All, Results, Measurements and Results)
The Estimated Duration column indicates the number of minutes entered as the job's estimated duration. -1 indicates that the duration will be calculated automatically according to the test durations.
The Stop On Fail column indicates whether the job was set to stop execution if any of its tests failed.
The Stop On Error column indicates whether the job was set to stop execution if any of its tests ended with an error.
The Topology Name column indicates the name of attached topology.
Duration Time Buffer indicates the number of minutes to be added to the duration estimation.
The job state indicates the current state of the job.
The job result indicates the result of the job execution.
|
out string[,] | Job Execution Servers | Indicates the execution servers for each job
Output is a two column matrix with Job Index and Execution Server as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
If a job has multiple execution servers, there will be a row with the same index value for each required execution server.
|
out string[,] | Topology Global Inputs | Indicates the topology’s input parameters and parameter values.
Output is a four column matrix with Job Index, Name, Value, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Topology Requirements Inputs | Indicates requirements for specific topology resources.
Output is a 6 column matrix with Job Index, Resource Path, Name, Value, Type, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix. The Resource Path column indicates the full path to the added topology resources.
The Type column indicates whether the Name and Value fields refer to resource model, quantity, or attribute.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Topology Additional Inputs | Indicates additional resource input parameters and values for the attached topology.
Output is a five column matrix with Job Index, Resource Path, Name, Value, and Possible Values as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Resource Path column indicates the full path to the added topology resources.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Jobs Test Details | Information about the tests that were selected for this job.
Output is a nine column matrix with Job Index, Test Index, Test Path, Test Estimated Duration, State, Start Time, End Time, Result, and Report ID as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Test Index column should be a run of unique numbers that specifies the order of the tests. The test index will be used as the test identifier in the Test Parameters input matrix.
The Test Path column indicates the location of each test.
The State column indicates the current status for each test.
The Start Time and End Time columns indicate the execution start and end times for each test.
The Result column indicates the test status.
Concatenate the Report ID column value to the relevant IP address to create a URL to the test report.
The Test Estimated Duration is the estimated number of minutes for the execution of the test, This value will be used to calculate the job duration.
|
out string[,] | Jobs Test Parameters | Parameter information for each of the job's tests.
Output is a four column matrix with Job Index, Test Index, Parameter Name and Parameter Value as the column headings.
The Job Index column corresponds to the value in the Jobs Details matrix.
The Test Index column corresponds to the value in the Test Paths matrix.
Tests with multiple parameters will have a row for each parameter, with the same Test Index value over multiple rows.
|
out string | Suite Status | Indicates the current status of the automation suite: Pending, Started, Ended or Failed to Start |
out string | Suite Result | Indicate the result of the suite: Error, Failed, Succeeded |
out string | Remaining Jobs | Indicates the number of uncompleted jobs |
out DateTime | Start Time | Indicates the date and time when the suite began execution. |
out DateTime | End Time | Indicates the date and time when the suite completed its execution. The value will be null if the execution hasn't yet ended. |
Example
string suiteTemplateName, suiteName, description, type, owner, suiteStatus, suiteResult;
double removeJobsFromQueueAfter;
bool endReservationOnEnd;
string[,] jobsDetails, jobExecutionServers, topologyGlobalInputs, topologyRequirementsInputs, topologyAdditionalInputs, jobsTestDetails, jobsTestParameters;
int remainingJobs;
DateTime startTime, endTime;
api.GetSuiteDetails("d071cd61-f958-4002-8149-a433c6fc458a", out suiteTemplateName, out suiteName, out description, out type, out owner, out removeJobsFromQueueAfter, out endReservationOnEnd, out jobsDetails, out jobExecutionServers, out topologyGlobalInputs, out topologyRequirementsInputs, out topologyAdditionalInputs, out jobsTestDetails, out jobsTestParameters, out suiteStatus, out suiteResult, out remainingJobs, out startTime, out endTime);
Stop Suite Execution
Syntax
void StopSuiteExecution(string suiteId)
Parameters
Type | Name | Description |
---|---|---|
string | Suite Id | Specify the ID of the automation suite to stop. |
Example
api.StopSuiteExecution("d071cd61-f958-4002-8149-a433c6fc458a");
Import Package
Syntax
void ImportPackage(string pacakgePath)
Parameters
Type | Name | Description |
---|---|---|
string | Package Path | Full path to the location of the package that is going to be imported |
Example
string packagePath = @"c:\temp\package.zip";
api.ImportPackage(packagePath);
Export Package
Syntax
void ExportPackage(string packageSavePath, string[] topologiesNames)
Parameters
Type | Name | Description |
---|---|---|
string | Save Path | Full file path to the location to where the package is going to be exported. Overwrites the file if exists. |
string[,] | Topologies | Names of the topologies to include in the package |
Example
string packageSavePath = @"c:\temp\package.zip";
api.ExportPackage(packageSavePath, new[] {"topo1","topo2"} );
Enqueue Custom Job
Syntax
void EnqueueCustomJob(string name, string description, string[] executionServers, LoggingProfile loggingProfile, double estimatedDuration, bool stopOnFail, bool stopOnError, string[,] testPaths, string[,] testParameters, string topologyName, string[,] topologyGlobalInputs, string[,] topologyRequirementsInputs, string[,] topologyAdditionalInputs, double durationTimeBuffer, EmailNotifications emailNotifications, string type, out string jobId)
Parameters
Type | Name | Description |
---|---|---|
string | Job Name | Specify the name of the job. (Limited to 50 characters) |
string | Description | Provide a short description of the job. (Limited to 500 characters) |
string[,] | Execution Servers | Specify a list of one or more execution servers for running the job.
Leave empty to run the job on any available execution server.
|
string | Logging Profile | Indicate which logging profile to use when executing the job's tests.
None, All, Results, Measurements and Results
|
int | Estimated Duration | Specify the time (in minutes) it will take to complete the job
-1 indicates that the duration will be calculated automatically according to the test durations.
|
bool | Stop On Fail | Indicate whether to stop the job execution if one of the tests fails. |
bool | Stop On Error | Indicate whether to abort the job if any test ends with an error. |
string[,] | Test Paths | Provide the full path to each of the job's tests.
The input should be a three column matrix with Index, Test Path, and Test Estimated Duration as the column headings.
If you omit the column headings, use empty values for the top row.
The index column should be a run of unique numbers that specifies the order of the tests. The test index will be used as the test identifier in the Test Parameters input matrix.
The test path column should contain the full details about the location of the test, for example: TestShell\Tests\Shared\Validation\TestCase1.
The Test Estimated Duration is the estimated number of minutes for the execution of the test, This value will be used to calculate the job duration.
|
string[,] | Test Parameters | Specify the input parameters for each of the job's tests.
Input should be a three column matrix with Index, Parameter Name, and Parameter Value as the column headings.
If you omit the column headings, leave an empty row.
The Index column corresponds to the test index from the Test Path matrix.
If a test has multiple inputs, there will be a row with the same index value for each required parameter.
|
string | Topology Name | Specify which topology to attach to the job (Optional) |
string[,] | Topology Global Inputs | Provide a List of input parameters and parameter values for the attached topology (Optional).
Input should be a three column matrix with Name, Value, and Possible Values as the column headings.
If you omit the column headings, use empty values for the top row.
If any of the parameters have predefined values, they will be displayed in the Possible Values column. This column is only relevant when retrieving information.
|
string[,] | Topology Requirements Inputs | Provide requirements for specific resources that must be included in the topology (Optional).
Input should be a five column matrix with Resource Path, Name, Value, Type, and Possible Values as the column headings.
If you omit the column headings, use empty values for the top row.
In the Resource Path column, specify the full path to the required resources.
In the Type column, indicate whether the Name and Value fields refer to resource model, quantity, or attribute.
If any of the parameters have predefined values, they will be displayed in the Possible Values column. This column is only relevant when retrieving information.
|
string[,] | Topology Additional Inputs | Provide a list of additional input parameters and values for the attached topology (Optional).
Input should be a four column matrix with Resource Path, Name, Value, and Possible Values as the column headings.
If you omit the column headings, use empty values for the top row.
In the Resource Path column, specify the full path to the required resources.
If any of the parameters have predefined values, they will be displayed in the Possible Values column. This column is only relevant when retrieving information.
|
int | Duration Time Buffer | Indicates the number of minutes to be added to the duration estimation.
Note that this parameter is used only when "Estimated Duration" is calculated automatically.
|
string | Email Notification | Specify notification trigger settings: None, Errors Only, Suite and Errors, or All. |
string | Type | Indicates the automation suite type. Default value: TestShell |
Example
string jobId;
api.EnqueueCustomJob("job1", "job description", null, QualiAPI.UserModel.LoggingProfile.Results, 5, false, false,
// test paths
new string[,] { { "Index", "Test Path" }, { "1", "TestShell\\Tests\\Shared\\TestWithInputs" }},
// test params
new string[,] { { "Index", "Parameter Name", "Parameter Value" },
{ "1" , "InStr", "a"},
{ "2" , "InNum", "1"},
{ "3" , "InStrVect", "['b', 'c', 'd']"},
{ "4" , "InNumVect", "[2, 3, 4]"},
{ "5" , "InStrMat", "['e', 'f', 'g';'h', 'i', 'j';]"},
{ "6" , "InNumMat", "[5, 6, 7;8, 9, 10;]"}
},
null,
// topology global inputs
new string[,] { { "Name", "Value", "Possible Values" } },
// topology requirements inputs
new string[,] { { "Resource Path", "Name", "Value", "Type", "Possible Values" } },
// topology additional inputs
new string[,] { { "Resource Path", "Name", "Value", "Possible Values" } },
3, QualiAPI.UserModel.EmailNotifications.None, "TestShell",out jobId);
Output
"001f4d30-31e1-4e56-b02e-d332c6fb91e4"
Get Job Details
Syntax
void GetJobDetails(string jobId, out string suiteId, out string name, out string description, out string ownerName, out JobState jobState, out JobResult jobResult, out string jobFailureDescription, out DateTime enqueueTime, out DateTime startTime, out DateTime endTime, out double elapsedTime, out double estimatedDuration, out double durationTimeBuffer, out bool useAnyExecutionServer, out string[] executionServers, out string selectedExecutionServer, out LoggingProfile loggingProfile, out bool stopOnFail, out bool stopOnError, out DateTime expectedStartTime, out string[,] testDetails, out string[,] testParameters, out string topologyName, out string[,] topologyGlobalInputs, out string[,] topologyRequirementsInputs, out string[,] topologyAdditionalInputs)
Parameters
Type | Name | Description |
---|---|---|
string | Job Id | Specify the ID of the job to retrieve |
out string | Job Name | The name of the job associated with the specified job ID. (Limited to 50 characters) |
out string | Description | The description of the job associated with the specified job ID. (Limited to 500 characters) |
out string | Owner Name | The name of the user who created this job. |
out string | Job State | The current state of the job. Pending, Scheduled, Running, Done, Stopped, Cancelled or Failed to Start. |
out string | Job Result | The result of the job execution: Completed, Passed, Failed, Ended With Error, Ended With An Exception, Manually Stopped, Terminated, or Not Started |
out string | Job Failure Description | A short description of the reason for a failed execution. This value will be empty for a running job or for completed jobs that ran without problems. |
out DateTime | Enqueue Time | The date and time when the job was enqueued. |
out DateTime | Start Time | The date and time when the job started running. The value will be null if the job is still Pending or Failed to Start. |
out DateTime | End Time | The date and time when the job stopped running. The value will be null if the job has not yet ended. |
out int | Elapsed Time | The number of minutes that have elapsed since the job started.
Returns -1 if the job hasn't started yet.
Returns the job duration (in minutes) if the job has already finished.
|
out bool | Use Any Execution Server | Indicates that the job owner allowed the job to run on any available server. |
out string[,] | Execution Servers | A list of Execution server names that were selected by the user for this job. This parameter will have values only if the job is still pending. |
out string | Selected Execution Server | The execution server that was selected to run the job. |
out string | Logging Profile | The selected logging profile for this job’s tests. None, All, Results, Measurements and Results |
out bool | Stop On Fail | Indicate whether to stop the job execution if one of the tests fails. |
out bool | Stop On Error | Indicate whether to abort the job if any test ends with an error. |
out string[,] | Test Details | Information about the tests that were selected for this job.
Output is an eight column matrix with Index, Test Path, Test Estimated Duration, State, Start Time, End Time, Result, and Report ID as the column headings.
The Index column will display a run of unique numbers.
The Test Path column indicates the location of each test.
The Test Estimated Duration is the estimated number of minutes for the execution of the test, This value will be used to calculate the job duration.
The State column indicates the current status for each test.
The Start Time and End Time columns indicate the execution start and end times for each test.
The Result column indicates the test status.
Concatenate the Report ID column value to the relevant IP address to create a URL to the test report.
|
out string[,] | Test Parameters | Parameter information for each of the job's tests.
Output will be a three column matrix with Index, Parameter Name and Parameter Value as the column headings.
The Index column corresponds to the index value in the Test Details matrix.
Tests with multiple parameters will have a row for each parameter, with the same index value over multiple rows.
|
out string | Topology Name | Indicates the name of the attached topology. |
out string[,] | Topology Global Inputs | Indicates the topology’s input parameters and parameter values.
Output is a three column matrix with Name, Value, and Possible Values as the column headings.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Topology Requirements Inputs | Indicates requirements for specific topology resources.
Output is a five column matrix with Resource Path, Name, Value, Type, and Possible Values as the column headings.
The Resource Path column indicates the full path to the added topology resources.
The Type column indicates whether the Name and Value fields refer to resource model, quantity, or attribute.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out string[,] | Topology Additional Inputs | Indicates additional resource input parameters and values for the attached topology.
Output is a four column matrix with Resource Path, Name, Value, and Possible Values as the column headings.
The Resource Path column indicates the full path to the added topology resources.
If any of the parameters have predefined values, they will be displayed in the Possible Values column.
|
out int | Duration Time Buffer | Indicates the number of minutes to be added to the duration estimation. |
out DateTime | Expected Start Time | The expected execution start date and time for a job that is currently pending. |
out string | Suite Id | The ID of the suite that was used to create this job. |
Example
string suiteId, name, description, ownerName, jobFailureDescription, selectedExecutionServer, topologyName;
JobState jobState;
JobResult jobResult;
DateTime enqueueTime, startTime, endTime, expectedStartTime;
double elapsedTime, estimatedDuration, durationTimeBuffer;
bool useAnyExecutionServer, stopOnFail, stopOnError;
string[] executionServers;
LoggingProfile loggingProfile;
string[,] testDetails, testParameters, topologyGlobalInputs, topologyRequirementsInputs, topologyAdditionalInputs;
api.GetJobDetails("c0b859fb-554b-43c5-be04-9d3d55b818f0", out suiteId, out name, out description, out ownerName, out jobState, out jobResult, out jobFailureDescription, out enqueueTime, out startTime, out endTime, out elapsedTime, out estimatedDuration, out durationTimeBuffer, out useAnyExecutionServer, out executionServers, out selectedExecutionServer, out loggingProfile, out stopOnFail, out stopOnError, out expectedStartTime, out testDetails, out testParameters, out topologyName, out topologyGlobalInputs, out topologyRequirementsInputs, out topologyAdditionalInputs);
Get Queued Jobs
Syntax
void GetQueuedJobs(out string[,] queuedJobs)
Parameters
Type | Name | Description |
---|---|---|
out string[,] | Queued Jobs | Output is an seven column matrix with Job ID, Job Name, Owner, Enqueue Time, Job Details Url, Expected Start Time, and Suite Id as the column headings.
Job ID indicates the ID of each job.
Job Name indicates the name of the job.
Suite Id indicates the ID of the automation suite that was used to create each job.
Owner indicates name of the user who initiated each job.
Enqueue Time indicates the date and time that each job was added to the queue.
Expected Start Time indicates each job's expected execution start date and time.
Job Details Url indicates the link address to the REST function that retrieves the full details of the job.
|
Example
string[,] queuedJobs;
api.GetQueuedJobs(out queuedJobs);
Get Running Jobs
Syntax
void GetRunningJobs(out string[,] runningJobs)
Parameters
Type | Name | Description |
---|---|---|
out string[,] | Running Jobs | Output is a nine column matrix with Job ID, JobName, Owner, Start Time, Execution Server, Current Test, Current Test ID, Total Tests, and suiteId as the column headings.
Job ID indicates the ID of each running job.
JobName indicates the name of the job.
suiteId indicates the ID of the automation suite that was used to create each job.
Owner indicates name of the user who initiated each job.
Start Time indicates when each job was started.
Execution Server indicates the name of the execution server running each job.
Current Test indicates the test that is currently being executed for each running job.
Current Test ID indicates the ID of the currently running test.
Total Tests indicates the number of tests for each running job.
|
Example
string[,] runningJobs;
api.GetRunningJobs(out runningJobs);
Stop Job Execution
Syntax
void StopJobExecution(string jobId)
Parameters
Type | Name | Description |
---|---|---|
string | Job Id | Specify the ID of the job to stop. |
Example
api.StopJobExecution("c0b859fb-554b-43c5-be04-9d3d55b818f0");
Get Reservation Attachment
Syntax
void GetReservationAttachment(string reservationId, string fileName, string saveToFolderPath)
Parameters
Type | Name | Description |
---|---|---|
string | Reservation Id | Specify the id of the reservation. |
string | Filename | Specify the requested filename in the reservation. |
string | Save Path | Specify the path where the file will be saved |
Example
api.GetReservationAttachment("c0b859fb-554b-43c5-be04-9d3d55b818f0","report","c:\");
Get Reservation Attachments Details
Syntax
void GetReservationAttachmentsDetails(string reservationId, out string[] filenames)
Parameters
Type | Name | Description |
---|---|---|
string | Reservation Id | Specify the id of the reservation. |
out string[,] | Filenames | List of reservation's saved attachments. |
Example
string[] filenames;
api.GetReservationAttachmentsDetails("c0b859fb-554b-43c5-be04-9d3d55b818f0",out filenames);
Attach File To Reservation
Syntax
void AttachFileToReservation(string reservationId, string filePath, string saveFileAs, bool overwriteIfExists)
Parameters
Type | Name | Description |
---|---|---|
string | Reservation Id | Specify the id of the reservation. |
string | File path | Specify the path of the file that needs to be uploaded as a form-data param named ‘QualiPackage’. |
string | Save file as | Save file as |
string | Overwrite If Exists | Overwrite If Exists |
Example
api.AttachFileToReservation("c0b859fb-554b-43c5-be04-9d3d55b818f0","c:\report.ext","report1",true);
Delete File From Reservation
Syntax
void DeleteFileFromReservation(string reservationId, string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | Reservation Id | Specify the id of the reservation. |
string | Filename | Specify the fullname of the file to delete |
Example
api.DeleteFileFromReservation("c0b859fb-554b-43c5-be04-9d3d55b818f0","report1");