5

I'm developing a website in asp.net webforms with 3 layers; UI, BLL and DAL The website is already developed, but i like have more control about the unit tests of each form

Pass specific values at specific inputs for i see, if application survives or not.

I already study about NUnit but in webforms in UI layer how can apply these tests?

What i wnat is get some way to test UI (validations) without have to access to the BLL as i was an user.

I'm trying to add the Unit tests to my app but i not sure how to do it!

somebody can help my small-bigger problem?

2 Answers 2

3

You can add unit test to your UI using one of these tools

With both tools you can generate C# or VB classes that can be used by NUnit. IMHO, UI test are not as reliable as the common unit tests. Bacause timing conditions you may randomly find that some test will fail.

I used both tools and I recommend selenium mainly because you can generate test that can be run against any browser.

Here an example how to use Watin with NUnit http://www.codeproject.com/KB/applications/SimpleUITestHarness.aspx

And here a guide how to use Seleniun with Nunit http://www.lostechies.com/blogs/agilecruz/archive/2009/02/10/how-to-configure-selenium-rc-for-use-in-c-nunit-tests.aspx

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

Comments

0

If I understand your question correctly, you're asking how to automate testing a WebForms UI. If I misunderstand, please correct this understanding.

Frankly, I don't think there is a good answer out there for this. There are two options, however, that work okay:

  1. Visual Studio Test Edition
  2. Telerik's Web Testing (both a free version and a version with a cost)

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.