Skip to main content
All CollectionsAPI & Integrations
Using the C# Binding for Automation Testing
Using the C# Binding for Automation Testing
Updated over 2 months ago

Vansah’s API is designed to facilitate the integration of Vansah with a wide range of tools, automation, and development frameworks, including third-party applications.

One such integration option is the .NET Vansah C# Binding, which enables automation projects using .NET and C#.

For instance, a commonly used tool in this context is Selenium, which can be utilized alongside (.NET C#).

Tools and Languages

Prerequisite

  • Generate Vansah Connect Token

  • Atleast 1 Test Case linked to a Jira Issue to run

  • Download Vansah API-Binding for C# from Github

  • Selenium dependency should be installed

Usage/Examples

Step 1

Include VansahNode.cs into your Project directory

image

Step 2

Configure VansahNode.cs file and paste your vansah connect token here

image

Step 3

Provide your Jira Issue Key, Test Case Key and the result as per the below snippet

? Note :

The Test Case must be Linked to an Asset such as Jira Issue Key or TestFolder Identifier for which you want to send the Test Results.

[Test] 

public void TestCase1()

{ VansahNode execute = new VansahNode(); //Provide your Jira Issue Key execute.SetJira_Issue_Key("Test-1");

try

{ Assert.Pass(); //Provide Your Test Case Key and Result //n/a, failed, passed, untested execute.AddQuickTestFromJiraIssue("Test-C1", "passed");

} catch (Exception ex)

{ //Provide Your Test Case Key and Result //n/a, failed, passed, untested execute.AddQuickTestFromJiraIssue("Test-C1", "failed");
}

}

Step 4

Run your Tests

image

image

Step 5

Check your Jira instance for the issue related to the run

image


Did this answer your question?