Is there a headless browser for .NET (for automated Web-UI-Tests)?
Asked Answered
S

4

8

Is there a headless browser for .NET?

I am looking for this in a testing context.

Coming from Java I am thinking of something similar to HtmlUnit (http://htmlunit.sourceforge.net/) which itself is the base for different higher level tools like Canoo WebTest or Celerity.

I would like to create automated UI tests for web applications in a .Net environment, but not using Browser-Remoting (Watin, Selenium...)

If possible, I would like to stick to a .Net solution and avoid using Java or Ruby tools.

What are the options? What are you guys doing?

Thanks

Scoundrel answered 17/1, 2010 at 12:34 Comment(0)
S
0

If you're adamant about sticking with pure .Net solutions, then you have a few useful options, although none of them are really great.

  • HtmlUnit with IKVM. This will let you run HtmlUnit in .NET, but I've found that the converted code tends to be much slower than HtmlUnit all by itself.
  • Data Extraction SDK. You could wrap this to roll your own request processor, and it'll handle cookies, forms, et cetera.
  • System.Net.WebRequest. Requires the most heavy lifting, but underpins most of what you'd be working with anyway.

You can also consider looking at LiquidTest, but it's not cheap: developer licenses start at $2,000. And if you want to run it on a continuous integration server, that'll cost you another $1,000 for a server license.

IMO, while the libraries and languages in .NET provide some powerful features, the supporting toolset often falls short of competitors in other languages in some areas. Unfortunately, web integration testing is one of those areas.

Shoreless answered 17/1, 2010 at 12:49 Comment(0)
B
1

You might want to check out the new Web Testing features of Visual Studio 2010:

http://channel9.msdn.com/posts/VisualStudio/New-Web-Test-Debugging-Features-in-Visual-Studio-Team-System-2010/

You can download Beta 2 of VS2010 for free and try them for yourself.

Bellow answered 17/1, 2010 at 13:32 Comment(1)
There's also the existing WebTest test type available in VS2005 and VS2008, which can be used in load tests, or as html unit tests.Floranceflore
O
1

See if Headless browser for C# (.NET)? and disable IE visibility while using WatiN is what you looking for (if so, I can expand this answer with more details)

Oleary answered 15/12, 2014 at 6:20 Comment(0)
S
0

If you're adamant about sticking with pure .Net solutions, then you have a few useful options, although none of them are really great.

  • HtmlUnit with IKVM. This will let you run HtmlUnit in .NET, but I've found that the converted code tends to be much slower than HtmlUnit all by itself.
  • Data Extraction SDK. You could wrap this to roll your own request processor, and it'll handle cookies, forms, et cetera.
  • System.Net.WebRequest. Requires the most heavy lifting, but underpins most of what you'd be working with anyway.

You can also consider looking at LiquidTest, but it's not cheap: developer licenses start at $2,000. And if you want to run it on a continuous integration server, that'll cost you another $1,000 for a server license.

IMO, while the libraries and languages in .NET provide some powerful features, the supporting toolset often falls short of competitors in other languages in some areas. Unfortunately, web integration testing is one of those areas.

Shoreless answered 17/1, 2010 at 12:49 Comment(0)
S
0

By browser remoting I assume you mean remotely controlling a 3rd party browser. Selenium offers a driver for the java browser, htmlUnit, which is a headless browser (no GUI). http://seleniumhq.org/docs/03_webdriver.html#htmlunit-driver

Spillar answered 4/12, 2012 at 1:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.