views:

37

answers:

1

In my project we use UnitTests (MsTest). We run them manually and in the build script. But for some environments where we deploy manually.

We are in the need of having some smoke tests. At the moment I made this smoke tests "manually" (Login, create an user, create a licence, create a product, etc).

I know I can run unit tests from command line or from visual studio but...

Do you know if is possible to run these mstests (or probably a small subset) from an .aspx page and show the results?

EDITED: wondering if mstests or something is able to run the tests and have something visual to show in an .aspx page similar to a list of tests passed and tests failed... I am thinking on running only a small subset of tests (5-6)

+1  A: 

If you can run them from command line then you can run them from aspx file. Check Process class.

VinayC
Thanks is a solution... but I think that if I run it from command line I won't be able to put a smart output in exit. I will be able only to put if smoke tests runned ok or not. I will investigate.
cad
@cad, I am not sure where the test run output is written - is it shown on command prompt or in a separate file. If file then command line must have option to specify the path and that way, you can show it. If test run result is shown on command line then process allows you to redirect standard output (http://aspcode.net/process-start-and-redirect-standard-output) so that shouldn't be an issue either.
VinayC
As you say, if it is shown in a separate file I will be able to show it. I will try it now. Thanks :)
cad