2023.1.0 Quali API C# Reference Guide


Login

Starts a new session in Quali Server using the requested user credentials.

Syntax

void Login(string serverMachine, int serverPort, string username, string password, string domain)

Parameters

TypeNameDescription
stringserverMachine
IP address or host name of the Quali Server machine, i.e.: 192.100.1.2 or QsServer.
stringserverPort
The TCP port that the Portal is configured to work on.
stringusername
Username to login with.
stringpassword
Specify the user's login password.
stringdomain
Specify the name of the domain.

Example


        QualiAPI.QualiAPI api = new QualiAPI.QualiAPI();
        api.Login("localhost", 9000, "admin", "admin", "Global");
      

back to TOC

SecureLogon

Starts a new session in Quali Server using the requested user credentials.

Syntax

void SecureLogon(string serverMachine, int serverPort, string token, string domain)

Parameters

TypeNameDescription
stringserverMachine
IP address or host name of the Quali Server machine, i.e.: 192.100.1.2 or QsServer.
stringserverPort
The TCP port that the Portal is configured to work on.
stringtoken
Token to login with.
stringdomain
Specify the name of the domain.

Example


        QualiAPI.QualiAPI api = new QualiAPI.QualiAPI();
        api.SecureLogon("localhost", 9000, "authToken", "Global");
      

back to TOC

Get Available Suite Templates

Retrieves the list of all available automation suites.

Syntax

void GetAvailableSuiteTemplates(out string[,] templates)

Parameters

TypeNameDescription
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);
      

back to TOC

Get Suite Template Details

Retrieves properties of the specified automation suite template.

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

TypeNameDescription
stringSuite Template Name
the name of the suite template that is used as a container for the suite
out stringDescription
Displays the automation suite description.
out stringType
Indicates the automation suite type.
out stringOwner
Indicates the name of the user who created the automation suite.
out DateTimeCreate Date
Indicates the create date and time of the automation suite.
out DateTimeModification Date
Indicates the last update date and time of the automation suite.
out stringEmail Notifications
Indicates notification trigger settings: None, Errors, Suite and Errors, or All.
out intRemove 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 boolEnd 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 stringExisting 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);
      

back to TOC

Enqueue Custom SuiteEnqueue Custom Suite

Create a new custom automation suite and add it to queue

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

TypeNameDescription
stringSuite Template Name
Specify the name of the suite template to use as a container for the suite. Empty value indicates an adHoc suite.
stringSuite Name
Specify the name of the suite template to use as a container for the suite. Empty value indicates an adHoc suite.
stringDescription
Specify the automation suite description.
stringType
Specify the automation suite type. Default value: TestShell
stringEmail Notifications
Specify notification trigger settings: None, Errors Only, Suite and Errors, or All.
intRemove 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.
boolEnd 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.
stringExisting 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 stringSuite 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

  • suiteId
  • 
            d071cd61-f958-4002-8149-a433c6fc458a
          

    back to TOC

    Get Suite Details

    Retrieves the full details of a specific automation suite instance

    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

    TypeNameDescription
    stringSuite Id
    Specify the ID of the automation suite.
    out stringSuite Template Name
    the name of the suite template that is used as a container for the suite
    out stringSuite Name
    Indicates the name of the automation suite.
    out stringDescription
    Displays the automation suite description.
    out stringType
    Indicates the automation suite type.
    out stringOwner
    Indicates the name of the user who created the automation suite.
    out stringEmail Notifications
    Indicates notification trigger settings: None, Errors, Suite and Errors, or All.
    out intRemove 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 boolEnd 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 stringSuite Status
    Indicates the current status of the automation suite: Pending, Started, Ended or Failed to Start
    out stringSuite Result
    Indicate the result of the suite: Error, Failed, Succeeded
    out stringRemaining Jobs
    Indicates the number of uncompleted jobs
    out DateTimeStart Time
    Indicates the date and time when the suite began execution.
    out DateTimeEnd 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);
          

    back to TOC

    Stop Suite Execution

    Stops the execution of all the suite's jobs

    Syntax

    void StopSuiteExecution(string suiteId)

    Parameters

    TypeNameDescription
    stringSuite Id
    Specify the ID of the automation suite to stop.

    Example

    
            api.StopSuiteExecution("d071cd61-f958-4002-8149-a433c6fc458a");
          

    back to TOC

    Import Package

    Imports a quali package into the system.

    Syntax

    void ImportPackage(string pacakgePath)

    Parameters

    TypeNameDescription
    stringPackage 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);
          

    back to TOC

    Export Package

    Export a quali package into the system.

    Syntax

    void ExportPackage(string packageSavePath, string[] topologiesNames)

    Parameters

    TypeNameDescription
    stringSave 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"} );
          

    back to TOC

    Enqueue Custom Job

    Creates a new custom job, attaches it to a new AdHoc suite, and adds it to the job queue.

    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

    TypeNameDescription
    stringJob Name
    Specify the name of the job. (Limited to 50 characters)
    stringDescription
    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.
    stringLogging Profile
    Indicate which logging profile to use when executing the job's tests. None, All, Results, Measurements and Results
    intEstimated 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.
    boolStop On Fail
    Indicate whether to stop the job execution if one of the tests fails.
    boolStop 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.
    stringTopology 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.
    intDuration 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.
    stringEmail Notification
    Specify notification trigger settings: None, Errors Only, Suite and Errors, or All.
    stringType
    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

  • jobId
  • 
            "001f4d30-31e1-4e56-b02e-d332c6fb91e4"	
          

    back to TOC

    Get Job Details

    Retrieves all details and parameters for a specified job.

    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

    TypeNameDescription
    stringJob Id
    Specify the ID of the job to retrieve
    out stringJob Name
    The name of the job associated with the specified job ID. (Limited to 50 characters)
    out stringDescription
    The description of the job associated with the specified job ID. (Limited to 500 characters)
    out stringOwner Name
    The name of the user who created this job.
    out stringJob State
    The current state of the job. Pending, Scheduled, Running, Done, Stopped, Cancelled or Failed to Start.
    out stringJob Result
    The result of the job execution: Completed, Passed, Failed, Ended With Error, Ended With An Exception, Manually Stopped, Terminated, or Not Started
    out stringJob 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 DateTimeEnqueue Time
    The date and time when the job was enqueued.
    out DateTimeStart 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 DateTimeEnd Time
    The date and time when the job stopped running. The value will be null if the job has not yet ended.
    out intElapsed 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 boolUse 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 stringSelected Execution Server
    The execution server that was selected to run the job.
    out stringLogging Profile
    The selected logging profile for this job’s tests. None, All, Results, Measurements and Results
    out boolStop On Fail
    Indicate whether to stop the job execution if one of the tests fails.
    out boolStop 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 stringTopology 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 intDuration Time Buffer
    Indicates the number of minutes to be added to the duration estimation.
    out DateTimeExpected Start Time
    The expected execution start date and time for a job that is currently pending.
    out stringSuite 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);
          

    back to TOC

    Get Queued Jobs

    Retrieves the list of all jobs that are currently in the job queue.

    Syntax

    void GetQueuedJobs(out string[,] queuedJobs)

    Parameters

    TypeNameDescription
    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);
          

    back to TOC

    Get Running Jobs

    Retrieves the list of all jobs that are currently running

    Syntax

    void GetRunningJobs(out string[,] runningJobs)

    Parameters

    TypeNameDescription
    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);
          

    back to TOC

    Stop Job Execution

    Stops the execution of the job

    Syntax

    void StopJobExecution(string jobId)

    Parameters

    TypeNameDescription
    stringJob Id
    Specify the ID of the job to stop.

    Example

    
              api.StopJobExecution("c0b859fb-554b-43c5-be04-9d3d55b818f0");
          

    back to TOC

    Get Reservation Attachment

    Get Reservation Attachment

    Syntax

    void GetReservationAttachment(string reservationId, string fileName, string saveToFolderPath)

    Parameters

    TypeNameDescription
    stringReservation Id
    Specify the id of the reservation.
    stringFilename
    Specify the requested filename in the reservation.
    stringSave Path
    Specify the path where the file will be saved

    Example

    
              api.GetReservationAttachment("c0b859fb-554b-43c5-be04-9d3d55b818f0","report","c:\");
          

    back to TOC

    Get Reservation Attachments Details

    Get Reservation Attachments Details

    Syntax

    void GetReservationAttachmentsDetails(string reservationId, out string[] filenames)

    Parameters

    TypeNameDescription
    stringReservation 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);
          

    back to TOC

    Attach File To Reservation

    Attach File To Reservation

    Syntax

    void AttachFileToReservation(string reservationId, string filePath, string saveFileAs, bool overwriteIfExists)

    Parameters

    TypeNameDescription
    stringReservation Id
    Specify the id of the reservation.
    stringFile path
    Specify the path of the file that needs to be uploaded as a form-data param named ‘QualiPackage’.
    stringSave file as
    Save file as
    stringOverwrite If Exists
    Overwrite If Exists

    Example

    
              api.AttachFileToReservation("c0b859fb-554b-43c5-be04-9d3d55b818f0","c:\report.ext","report1",true);
          

    back to TOC

    Delete File From Reservation

    Delete File From Reservation

    Syntax

    void DeleteFileFromReservation(string reservationId, string fileName)

    Parameters

    TypeNameDescription
    stringReservation Id
    Specify the id of the reservation.
    stringFilename
    Specify the fullname of the file to delete

    Example

    
              api.DeleteFileFromReservation("c0b859fb-554b-43c5-be04-9d3d55b818f0","report1");
          

    back to TOC