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:
i want use "currentenv" jenkins in code, i'm using config file shown below:
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
Post a Comment