NUnitAsp

NUnitAsp

NUnitAsp is a tool for automatically testing ASP.NET web pages. It's an extension to NUnit, a tool for test-driven development in .NET.

Contents

How It Works

NUnitAsp is a class library for use within your NUnit tests. It provides NUnit with the ability to download, parse, and manipulate ASP.NET web pages.

With NUnitASP, your tests don't need to know how ASP.NET renders controls into HTML. Instead, you can rely on the NUnitASP library to do this for you, keeping your test code simple and clean. For example, your tests don't need to know that a DataGrid control renders as an HTML table. You can rely on NUnitASP to handle the details. This gives you the freedom to focus on functionality questions, like whether the DataGrid holds the expected values.

 [Test]
 public void TestExample()
 {
   // First, instantiate "Tester" objects:
   LabelTester label = new LabelTester("textLabel", CurrentWebForm);
   LinkButtonTester link = new LinkButtonTester("linkButton", CurrentWebForm);
   // Second, visit the page being tested:
   Browser.GetPage("http://localhost/example/example.aspx");
   // Third, use tester objects to test the page:
   AssertEquals("Not clicked.", label.Text);
   link.Click();
   AssertEquals("Clicked once.", label.Text);
   link.Click();
   AssertEquals("Clicked twice.", label.Text);
 }

NUnitAsp can test complex web sites involving multiple pages and nested controls.

Credits & History

NUnitAsp was created by Brian Knowles as a simple way to read and manipulate web documents with NUnit. Jim Shore (known at the time as "Jim Little") took over the project shortly afterwards and refactored it to the Tester-based approach used for the first release. Since then, more than a dozen people have contributed to the product. In November 2003, Levi Khatskevitch joined the team as "patch king" and brought new energy to the project, leading to the long-anticipated release of version 1.4. On January 31, 2008, Jim Shore announced the end of its development.

See also

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • NUnit — 2.4.6 GUI on Windows Stable release 2.5.10 / April 2, 2011; 7 months ago (2011 04 02) Written in …   Wikipedia

  • Test unit — Test unitaire Pour les articles homonymes, voir Test. En programmation informatique, le test unitaire est un procédé permettant de s assurer du fonctionnement correct d une partie déterminée d un logiciel ou d une portion d un programme (appelée… …   Wikipédia en Français

  • Test unitaire — Pour les articles homonymes, voir Test. En programmation informatique, le test unitaire est un procédé permettant de s assurer du fonctionnement correct d une partie déterminée d un logiciel ou d une portion d un programme (appelée… …   Wikipédia en Français

  • Tests unitaires — Test unitaire Pour les articles homonymes, voir Test. En programmation informatique, le test unitaire est un procédé permettant de s assurer du fonctionnement correct d une partie déterminée d un logiciel ou d une portion d un programme (appelée… …   Wikipédia en Français

  • NUnit — Графическая среда NUnit 2.4.6 под Windows Тип Система автоматизированного тестирования …   Википедия

  • NUnit — es un framework open source de Pruebas de unidad para Microsoft .NET y Mono. Sirve al mismo propósito que JUnit realiza en el mundo Java, y es uno de muchos en la familia xUnit. NUnit.Forms es una expansión al framework núcleo NUnit y es también… …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”