testing

MVC moq unit test the object before RedirecToAction()

I want to test the data inside the "item" object before it redirect to another action. public ActionResult WebPageEdit(WebPage item, FormCollection form) { if (ModelState.IsValid) { item.Description = Utils.CrossSiteScriptingAttackCheck(item.Description); item.Content = Utils.CrossSiteS...

What is the definition of BDD?

BBD is referenced in this thread (Karl Seguin's answer). What is BDD? ...

Stress Testing in Visual Studio

Visual Studio 2008 has a test type called a Load Test. It looks like I can just drop a collection of other tests into it, give it a test profile (say, 50 users constantly hitting the program), a running time, and let it run. What isn't clear to me, is how to actually setup the tests it consumes. I need to launch a instance of the pr...

Is it possible to test a WAP site without using a mobile phone?

I was wondering if it was possible to do this via a browser or an emulator. When I try it from my browser I get "Unknown file type text/vnd.wap.wml" Thanks Shiraz ...

Export Visual Studio test results in some document / report format?

It is possible to export/print Visual Studio test results in some document format, maybe including test details? Thanks ...

Looking for web development tool: (firefox plugin, etc) that lets you browse to IP and inject your own URL?

Is there any such thing that would allow me to use an IP address to browse with HTTP but then give it a URL to use for the web app to pick up on? This would allow me to test multiple server locations of a web app (think dev, QA, live) without having to change my hosts file or manage a bunch of sub-subdomains. So for example if the site i...

Can I run JUnit 4 to test Scala code from the command line?

If so, how? I haven't come across the proper incantation yet. If not, what's the best approach to unit-testing Scala code from the command line? (I'm a troglodyte; I use IDEs when I have to, but I prefer to play around using Emacs and command-line tools.) ...

General (non-server-specific) HTTP server test suite?

I'm looking for a test suite to test an HTTP server for standards compliance. The test suite should therefor not be server-specific, like Apache's HTTP server test suite. Any pointer would be greatly appreciated. Regards, Jochen ...

Can someone recomend me a simple tool for stress testing of web apps (with a popup windows support)

I have a relatively simple ASP.NET application which I need to stress test (e.g. run it in a simulated environment of 20 concurrent users). Even though app is relatively simple there a few places where it brings up a popup window with one button on it. When user clicks that button - a response return some text back to the pop up window....

When developing Visual Studio add-ins, what testing options are there beyond manual testing?

I'm in the process of developing a Visual Studio add-in for a project at work, and have found debugging and testing it to be pretty tedious. So far, it appears to require the launching of a second instance of Visual Studio and manual execution of the add-in code. What techniques and/or tools are available for automating this sort of ad...

Is it a good idea to use T4 to code-gen mock objects for interfaces?

I'm familiar with unit testing, but am still learning about mocks and mocking frameworks. I get the ideas (I think), but the syntax still seems a little foreign. I'm considering creating some T4 templates that automatically generate mock implementations of interfaces and classes. Using a combination of generics and extension methods, thi...

How to unit test an email client

I'm working on a desktop email client right now, and I want to unit test my backend. However, I can't see a way to make that work. In order for my code to work, it has to connect to a working mail server. Unless I tie my unit tests to an email account, and make sure that account matches the state my tests expect, I don't see how I can ma...

On Test Driven Development BUT in REVERSE

I appreciate TDD and think it indispensable but always write my tests ONLY after I write my source code then refactor accordingly. I can never bring myself to write the test first then the source to pass the test. So I always reverse the process. Is this a bad practice on my part? What are the disadvantages of doing it in reverse like me...

How can I unit test Perl functions that print to the screen?

I'm trying to use Test::More to unit test Perl functions that print to the screen. I understand that this output may interfere with tools such as prove. How can I capture this output so I can print it with diag(), and also run tests on the output itself? ...

How do you test dependent classes that cannot be unit tested together?

I have a question about how to test 2 classes which have a dependency between each other, but cannot be unit tested together. I am not able to create a short enough code example so I will attempt to explain it with hypothetical classes. Sorry if this is too confusing, but I am still trying to come up with a succinct example. In this e...

How do I test a third party framework when I need to pass in an HttpResponse

I have a third party framework that I'm using to write out an excel document and have the user download it. The problem is that the user is attempting to export a large number of records, and it's throwing an OutOfMemoryException. I'm trying to write a test to verify that this is happening in the third party framework and not in my cod...

I need a string that won't properly convert to ANSI using several code pages.

My .NET library has to marshal strings to a C library that expects text encoded using the system's default ANSI code page. Since .NET supports Unicode, this makes it possible for users to pass a string to the library that doesn't properly convert to ANSI. For example, on an English machine, "デスクトップ" will turn in to "?????" when passed ...

python: how to send mail with TO, CC and BCC?

I need for testing purposes to populate few hundred email boxes with various messages, and was going to use smtplib for that. But among other things I need to be able to send messages not only TO specific mailboxes, but CC and BCC them as well. It does not look like smtplib supports CC-ing and BCC-ing while sending emails. Looking for...

Server testing a PHP app

I have a PHP application that will be accepting image uploads and I'm expecting ~20,000 in about 2 days. I have no concept of how much traffic my server can handle... How would I go about simulating this beforehand to make sure it works ok? I know Rails has systems that make testing easy, but what tools might I use to simulate uploads an...

Automatic run of VSTS web tests daily

Hello, Please I want a way to make daily schedule to run a set of VSTS 2008 web tests automatically over night. Your help will be appreciated. Wael ...