c# - NCrunch is launching the ApprovalTests DiffReporter -


how ncrunch stop launching diffreporter when running tests in background, diffreport when manually run test?

i've been trying working while now, none of combinations i've tried giving me results i'm looking for. leaving [usereporter(typeof(diffreporter))] attribute commented out. when test starts failing come , un-comment until fix issue, comment out, getting cumbersome methods multiple [testcase]. i've been reading on approvaltests blog, seems should possible.

my diff software beyond compare, , code looks this:

testproject/assemblyinfo.cs

[assembly: usereporter(typeof(ncrunchreporter))] 

testproject/classtests.cs

public class classtests {     [test]     //[usereporter(typeof(diffreporter))]     [testcase(1, 1)]     [testcase(1, 2)]     [testcase(2, 1)]     [testcase(3, 1)]     public void testcase(int errornumber, int )     {         using (approvalresults.forscenario(errornumber, testcasesubtestnumber))         {             var results = dosomething();              approvals.verify(results);         }     } } 

update:
i'm using following nuget packages:
- approvaltests v3.0.11
- approvalutilities v3.0.11
- nunit v3.2.1

it should default behavior. actual code want

[assembly: frontloadedreporter(typeof(ncrunchreporter))] 

but ncrunchreporter part of defaultfrontloadedreporter. these reporters go in front of reporter use , block if situation detected.

perhaps ncrunch has changed though. try running via ncrunch , reporting results

approvals.setcaller(); assert.istrue(ncrunchreporter.instance.isworkinginthisenvironment("a.txt")); 

it should true, if not ncrunch has changed , need update reporter accordingly.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -