Showing posts with label Assert Type. Show all posts
Showing posts with label Assert Type. Show all posts

Tuesday, 29 November 2011

Assert for Image in MStest

Few days back while giving an interview in some R&D company. The interviewer who took my interview asked me one question, how will you assert images in test method and I was unable to answer this question, cuz I had never used this in my automation till now. Let me put this in clear way!!


Question: In your test method how will you assert for image. Like assert that two given images are same or equal?

Answer: I was not having clear answer to this question. Just I told that we have to customize our Assert for images assert.

Then I come back and wrote piece of code to assert the image for AreEqual.

Here is the code. Thanks to interviewer who forced me to think about this.

Test Method:


Assert Class for Image(Assert.AreEqual)



Please feel free to provide your Feedback and comments!!
Thanks,
Md. Jawed


Tuesday, 16 August 2011

Unit Testing Framework and Type of Assert.

Few days back i had prepared a presentation about Unit Testing Framework and Type of assert in MStest.
which i have collected from ms website.
i had arranged all this in images formates so that it would be easy to access.
Thought to share the same with all of you!!
Happy Reading!!
  

Slide 1: The Title

Slide 2: Unit Testing Framework

Slide 3: Attributes Used to Establish a Calling Order

Slide 4: Assert Type

Slide 5:StringAssert Type

Slide 5: CollectionAssert Type

Slide 6: The End

Your Comments are always welcome!!
Thanks,
Md. Jawed