NUnitAsp
The topic of this article may not meet Wikipedia's general notability guideline. (October 2013) |
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.
How it works
NUnitAsp is a class library for use within NUnit tests. It provides NUnit with the ability to download, parse, and manipulate ASP.NET web pages.
With NUnitASP, tests do not need to know how ASP.NET renders controls into HTML. Instead, NUnitASP library can do this, keeping the test code simple and clean. For example, tests don't need to know that a DataGrid control renders as an HTML table; NUnitASP handles the details. This gives users 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 and 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
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.