As I mentioned in my previous post that in this post we will be discussing about test structure that we will are writing. Here I will be explaining in brief different types of attributes that can be used while writing our tests. Till now we have just used one attribute i.e. [TestMethod] which contains the test to be executed. There are other important attributes that can be used during tests to make tests well organized. Few of the attributes are as given below: [ClassInitialize] [ClassCleanup] [TestInitialize] [TestCleanup] [AssemblyInitialize] [TestMethod] [TestClass] [ClassInitialize] attribute can be used with a method that you want to execute before intialization of a class. So, let's suppose there are five tests in a test class then the method having [ClassInitialize] attribute will run only once for this class before running all the tests. [ClassCleanup] attribute can be used with a method that you want to execute after all the tests in the class ar...
Learning selenium with ease