Replacement for NUnitAsp - asp.net

Are there any replacements for NUnitAsp that anyone knows of for testing ASP.NET pages?

You can use WatiN or IEUnit.

You can try Selenium.

Please note that both IeUnit and WatiN are discontinued.
Using Selenium directly in tests is not a good idea, as you may probably need to encapsulate page objects.
I'd recommend to use the Playwright for .NET as a web UI automation test tool.
You may also consider using one of these tools:
Atata Framework
Canopy (F#)
Coypu
Test.Automation
TestStack.Seleno
See also
See also the list of Web Application Testing frameworks for .NET that is maintained and up-to-date:
List of Automated Testing Tools and Frameworks for .NET: Web Application Testing.

Related

frobot framework - Usage outside testing

I recently learned how to use robot framework - a testing framework for software / web app testing. It has very simple strong expressive syntax.
I wonder if there is possibility of any other usage of robot framework than testing - I could imagine to create some kind of scraping bot, or checking bot. But so far it looks to me, like it is created strictly for testing (basically whole logic you write in testcases).
So my question:
Can robot framework be used outside testing? If yes, can you provide any resources / examples?
Feel free to share any personal experience with this.
Yes, robot can be used outside of testing. Robot Framework version 3.1 added preliminary support for RPA (robotic process automation). Instead of tests, you can create tasks.
See Creating tasks in the robot framework user guide for a bit more information.

BizTalk, TestableReceivePipeline and FileAdapter

I want to test a pipeline which includes a custom component using properties in the message property bag, which at runtime the File Adapter creates. How do I inject those properties in a unit test ?
I think starting BizTalk Server 2009 there's already a build support for Visual Studio to generate test artifacts for BizTalk Server pipelines.
See this link http://msdn.microsoft.com/en-us/library/dd792682%28v=bts.10%29.aspx
Also here a very good blog which the author has summarized several way of testing BizTalk Server Artifacts. http://santoshbenjamin.wordpress.com/2009/02/05/biztalk-testing-and-mocks/
Personally, As mentioned by hugh above I'm also using the Tomas Restrepo's pipeline testing framework combined with Moq mocking framework, it has given me an advantage of a more stable and more fluent way of testing Biztalk applications.
Another advantage of http://winterdom.com/2007/08/pipelinetesting11released is if you're using BizUnit for your Unit or Integration testing then it is already supported.
Hope this helps
Sounds like you need to use Tomas Restrepo's pipeline testing framework:
http://winterdom.com/2007/08/pipelinetesting11released

Which testing frameworks to use for asp.net websites and why

I use visual studio 2005 and now my team wants me to try my hand at some testing frameworks for asp.net websites.I'm completely new to testing. I want to know what kind of automated testing can I do.Can I test my business logic,Can I test my UI.I just started using NUnit and I am getting a hang of it. For Web UI testing I've tried Nunit asp.Somewhere I found about Selenium, which of this is better.Also is there an add-in to test Javascript code with NUnit.Is there an better alternative to NUnit. I kind of find difficult to figure out why should I use this tools.
One option is to use Watin: http://watin.sourceforge.net/
There is a nice Test Recorder, which allows you to record and save your tests.
The only problem I have had with it is that it doesn't always play well with Cruise Control as it loads a browser engine in the background. If the CI server is running in an environment without the correct browsers installed and enabled, then the tests will fail. In this case we ended up using HtmlUnit, which is a java app that runs on the Cruise Control server.
http://htmlunit.sourceforge.net/

How apply Unit tests in ASP.NET webforms

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?
You can add unit test to your UI using one of these tools
http://watin.sourceforge.net/
http://seleniumhq.org/
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
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:
Visual Studio Test Edition
Telerik's Web Testing (both a free version and a version with a cost)

Can I use Webrat for ASP.NET applications?

Does Webrat require that the web application be written in Ruby/Rails?
I'd like to try it for writing tests against an ASP.NET web application.
You can use webrat for any application, not just Rails. What you do is to use Cucumber + Webrat + Mechanize adapter. This combination makes ordinary HTTP requests against your web application.
In fact, for the moment, i'm working on a simple smoketest that tests a website portal and can verify that everything is up and running in different environments. (localhost, test env, staging, production).
Have a look in Cucumbers' source. There is an example in the folder:
cucumber/examples/webrat/
What you do is to tell Webrat to use the Mechanize adapter. Now you have a headless browser that can access any application regardless of the framework it uses.
Note that if you need full javascript support, you probably want something else (Watir,Firewatir, Selenium, etc).
It would be easier to jump to rails :P I stumbled upon this post because I was thinking that would be very handy.
Have a look at Cuke4Nuke
Also checkout the authors blog, there is a nice screencast but it uses WatiN
There is also some discussion here about eventually being able to build the equivalent of webrat for mvc
https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/428-wire-protocol

Resources