ExpectedException Support

Jun 1, 2010 at 6:41 PM

Thank you so much for creating this plugin.  I was about to pull my face off dealing w/ the stock runner page thing for the SL unit test framework.

Is it just me or is the runner not handling ExpectedException?  All tests in my suite marked w/ the ExpectedException attribute are being reported as failed when they correctly throw the expected exception type.  The runner seems to be interpreting all thrown exceptions as test failures.  Anyone else seeing this behavior?

Coordinator
Jun 1, 2010 at 8:53 PM
Edited Jun 1, 2010 at 8:54 PM

I have not experienced this behavior. We always use a utility method "AssertThrows" instead of the ExpectedException attribute,
that makes your test correcter because it will only check the code that you expect throws the exception, not the whole test.

AgUnit uses the stock test runner from the SL toolkit unit test framework under the covers, with some glue code, and some code to make it faster ...
It is probably our interpretation in the glue code of the tests results of the framework that is causing this.
That code should be rewitten anyway as it is already pretty old (pre-Nov09 release iirc) and is no longer compatible with the latest release.

Coordinator
Jun 6, 2010 at 4:00 PM

The issue is fixed, and will be released with the upcoming 0.2 release.

Jun 27, 2010 at 4:38 PM

Is there something I can do to help get the 0.2 release out the door?

Coordinator
Jun 27, 2010 at 7:05 PM

Not really, I'm planning the release for tuesday afternoon. There is just one final piece of code that needs to be refactored.

 

If you want to contribute, these are some things that need work:

- Testing: Manual testing on various platforms and creating new dummy test projects. What currently is missing for example is tests with inheritance and silverlight UI tests.

- An installer (just like plugins from the resharper powertoys for example)

- MSTest runner compatibility: currently if you have the MSTest runner turned on it also tries to execute the tests. AgUnit also interferes with normal MSTest projects.

- Performance tuning

- Refactoring / code cleanup

- NUnit support, both in the resharper part and the silverlight part.

- Upgrade of the silverlight toolkit test runner, we currently use the Nov09 release I think. Maybe run them side-by-side depending on the version used in the test project ?

- Silverlight UI testing support

 

Just create a fork and when you're done I'll merge it into the project.