0

I have a textbox and button in an aspx page. I enter some text in the textbox and click the button which will result in the text being printed in the browser.

How can i unit test this scenario like the way i unit test class library methods by creating test methods.

Thanks in advance.

2
  • create a "test.aspx" page and insert your code? that's typically how I seclude/test my code. Commented Mar 8, 2011 at 5:20
  • What are you using? ASP.NET WebForms or ASP.NET MVC? Commented Mar 8, 2011 at 5:37

2 Answers 2

1

selenium and watin are two dotnet frameworks that allow you to do automated testing of asp.net web applications

Sign up to request clarification or add additional context in comments.

1 Comment

@SilverNight: i tatally agree. but "textbox and button in an aspx page" are not unittests, too. But these tests that can be done with "nunit"
0

If I understand you right you are trying to test your UI on a webapplication. As far as I know Visual Studio doesn't provide an appropriate way to do this. But there is this tool which is doing a good job:

http://seleniumhq.org/

The tool makes kind of a makro of the actions you have done on your website and repeats it if you want a thousand times.

Only downside is that it is not integrated in Visual Studio...

Greetings

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.