jeudi 7 novembre 2019

Is it possible to log the name of each method that is being executed?

we are working with MSTest and Selenium to run web tests. Right now we are trying to make the log more understandable and for that we would like to log each method name that the test has executed.

We are using VS2015 update 3 and MSTest 1.4

[TestClass]
    public class Test1: TestBase
    {
        [TestMethod]
        public void TEST_Method1()
        {
                driver.Url = targetURL
                loginPage.Login(USER, PASSWORD);

                homePage.GoToGraphics();
                homePage.GoToUserSearch();

                searchBI.Click_Calendar();
                searchBI.Select_November();

                ...
        }
    }

We would like the log to print

Starting TEST_Method1()
Executing loginPage.Login()
Executing homePage.GoToGraphics()
Executing homePage.GoToUserSearch()
Executing searchBI.Click_Calendar()
Executing searchBI.Select_November()
...




Aucun commentaire:

Enregistrer un commentaire