c# - How to pass Jenkins string parameter in Nunit Test -


i have added string parameter in smoke test job use in nunit test(written using c#) pass parameter dynamically based on environments. highly appreciated. thanks. here string parameter in jenkins: enter image description here

i want use "currentenv" jenkins in code, i'm using config file shown below:

enter image description here

public class helper {     public static readonly int currentenv = getcurrentenv();      private static int getcurrentenv()     {        var envappsetting= configurationmanager.appsettings["currentenv"];         int currenv;         switch (envappsetting)         {             case "dev":                 currenv = 1;// dev             case "qa":                 currenv = 2; // qa                 break;                             default:                 currenv = 1;                 break;         }         return currenv;     } } 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -