mardi 7 mars 2017

MS test, trying to insert my test name into test Capabilities

I am new to Automated testing (new to coding) and have been teaching myself C# and selenium using Visual Studio and MS Test. I am trying to get the test name (As defined from test Method) so I can insert this into a config class for my Browserstack/CBT comparison and review testing.

What I want to be able to define is something like

Testname = Name of test (from test method) so I can then insert this into my driver file

    IWebDriver driver;

            DesiredCapabilities caps = new DesiredCapabilities();

            caps.SetCapability("name", Testname);

Reading online I know there is a TestName capability in MS Test however I am not able to figure out how to utilise it for my purpose.

Any help greatly appreciated happy to give additional info if needed.

regards

Richard

Aucun commentaire:

Enregistrer un commentaire