TestContext in a CodedUi Testing

What is a Testcontext in a Codedui testing ?

When we record a scenario using the codedui testing methodology in the process of automating any particular scenario, a hierarchy gets generated. The hierarchy is nothing but a reflection of the mechanism that can be employed in order to associate a set of features with the particular class file. Normally, when we click on the project in the solution explorer, we get the option of add new test, which by default is a codedui test, a recording pop up comes up, clicking on the red button on the same starts up the scenario recording. But when recording starts how is that things get organised within the particular codedui test class file ?

It is all very complex to decipher out on the first go, but slowly as one matures with all this things become much more clear, as stuffs are very logically organised and inter related.

Every class file has the instantiation of a TestContext paramter with it. To be more useful, we can use some layman terms to understand the same term, as nothing more than the present context. Present context refers to the class file's associated set of methods and other features, more commonly used being, a data sheet file that we extensibly use very often.

This very logic can be very easily understood by the fact that when we attach a file such as a csv file, it si the TestContext.datarow method is brought into use to refer to the contents of the specific file.

Post a Comment

Previous Post Next Post