konstantinvlasenko / PowerSlim

Fitnesse Slim implementation in PowerShell. PowerSlim makes it possible to use PowerShell in the acceptance testing
powerslim.org
GNU General Public License v3.0
48 stars 21 forks source link

Problem with tests after upgrade to latest version with new exception handling #62

Closed NevRA closed 10 years ago

NevRA commented 10 years ago

New exception handling works correct. But we have such strange issue: after few exceptions EXCEPTION:ABORT_SLIM_TEST we can't execute tests without slim restart!

To reproduce it copy-paste below script 30 times on fitnesse page and execute it: !|script|Remote |"slim server name" | |show |eval |whoami | |eval |!- throw [System.IO.FileNotFoundException] "File not found !." -!|

When you get EXCEPTION:ABORT_SLIM_TEST all next execution on same slim server will fail. First test will fail with ABORT_TEST_INDICATED all next with "Test not run"

konstantinvlasenko commented 10 years ago

Yes. I just noticed the same behavior. Investigating...

NevRA commented 10 years ago

Ok. Thanks!

konstantinvlasenko commented 10 years ago

ok I've reproduced the issue here https://github.com/konstantinvlasenko/PowerSlim/tree/master/FitNesseRoot/PowerSlim/OriginalMode/SuiteFixes/SuiteIssue62 30 is the magic number?!

NevRA commented 10 years ago

Yep. We need only 18 execution to reproduce the issue. I said 30 to be sure that you will have 100% chance to reproduce it.

konstantinvlasenko commented 10 years ago

Interesting 17 times the exceptions filtered as System.Management.Automation.RuntimeException But for the 18th time it filtered as System.Management.Automation.ActionPreferenceStopException. I found this discussion http://www.techques.com/question/1-6779186/Powershell-try-catch-finally It looks like exactly our issue. I've implemented their switch inside catch solution. And it works! Going to commit changes soon.

konstantinvlasenko commented 10 years ago

Check Fix branch https://github.com/konstantinvlasenko/PowerSlim/tree/Fix It works!

konstantinvlasenko commented 10 years ago

OK. merged to master.

NevRA commented 10 years ago

Wow thanks! Really interesting )

2xmax commented 9 years ago

BTW, current implementation test run is yellow (has several exceptions).

konstantinvlasenko commented 9 years ago

These exception are by design as I can see. But agree it is not a good idea to have the yellow tests. We have the solution for such scenarios check test http://localhost/PowerSlim.OriginalMode.SuiteExceptions.ExceptionTestRunner