views:

150

answers:

6

I'm trying some string manipulation in my web app, but I don't want to compile the whole application just to see the result something simple.

Is there a (preferably free) tool I can use to do quick tests, or is there something in VS2008 I can use?

Thanks

+6  A: 

Take a look at NUnit

Visual Studio 2008 has some built in unit test capability.

Jay Riggs
+1  A: 

The common way to test a piece of code without building/running the whole application is unit tests. There are several frameworks helping you to do this.

For C#, I have used NUnit.

sbi
As always, I'd be interested to learn why this got voted down.
sbi
A: 

I recommend you to test functionalities like this with unit tests. I don't know C#, but there must be many frameworks and/or libs.

Juri Glass
+1  A: 

Use the unit testing framework that comes bundled with VS2008.

Note: You'll still have to build whatever project contains the code -- you can't get around that -- but you won't have to build the whole solution.

Randolpho
+6  A: 

If you're just looking to try out a few statements in immediate mode, LINQpad is great for writing short snippets.

LINQPad Homepage

meklarian
Use it all the time.
Will
+1 for LINQPad, was just going to suggest it
Chad
+1 also for LINQPad (although the creator needs to market it differently)
Darien Ford
A: 

If the string you want to change is in the ASPX page it's self you can just edit the page and save it. A simple refresh should update the results. If it is a variable value you should be able to use the Watch Window to change the value.

If you want a programmatic solution for testing a method you can either use the built in MSTEST, a simple custom console app, or one of the other unit test frameworks.

Matthew Whited