Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Be able to pin "current" test, not yet executed.
GreenMoose
#1 Posted : Thursday, February 21, 2013 6:33:02 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
[1.0.44]

Problem
I have the problem that building the test project takes ~30sec with NCrunch, so when I create a new test I expect to fail, I want to pin that in test window (to ensure it becomes red) and immediately navigate to some other place in code.

Currently I can only pin current test (Ctrl+M, Ctrl+P) if NCrunch has executed it.

Suggestion 1
I would like the possibility to pin a test by name:

I can place cursor on test method itself, or the test body, to pin that test even though NCrunch has not yet executed it (gray dots are visible).

Suggestion 2
* Scope: I can place cursor within e.g. a namespace or fixture and pin all those containing tests. IMHO this would be ok to only pin "executed" tests, i.e. somewhat differs from suggestion 1 above.

The "pin by scope" feature would be useful for e.g. integration tests (e.g. http endpoints) where NCrunch cannot automatically detect changes due to natural reasons, so I can pin those integration tests I am interesting in for my current work and easily run those now and then (by triggering the "Run all tests visible here" action), when using "Run impacted tests only" engine mode.

Thanks.
Remco
#2 Posted : Thursday, February 21, 2013 10:17:49 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,135

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for the suggestions!

I'll make a note about adding an option to pin all tests in the current file. NCrunch currently isn't scope aware within editor windows - so this is probably the closest I can get at the moment and it seems like a really good idea.

NCrunch does actually have the capability to pin unexecuted tests. You'll notice that after you write a new test and the project is built, a faded green 'arrow' will appear next to the first line of the test. This arrow can be used to perform context sensitive actions against the test in the same way as any executed line of code (i.e. pinning, ignoring, etc).

The key problem here I think you're experiencing is that because your project takes so long to build with NCrunch, you won't see the green arrow until a good 30 seconds after you've finished authoring the test stub and the project is actually able to compile. NCrunch doesn't make use of a metadata model in the same way as refactoring tools do - it instead relies on the output from the build process in order to find tests. This makes it impossible to locate a test without first completing a build.

As such, I'd like to learn a bit more about what may be contributing to your high build times and see if there are options to solve this. Reducing build times is a major long term goal of NCrunch and 30 seconds is definitely longer than I'd feel comfortable when working on a project myself. How long does this project usually take to build without NCrunch? Do you notice a significant improvement in performance if you turn off the 'Instrument output assembly' option for the project?


Cheers,

Remco

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download