question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execution Order before_all does not get called

See original GitHub issue

I’ve followed the execution order page: https://github.com/nspec/NSpec/wiki/Execution-Orders

However it does not seem to call before_all, my understanding is before_all should get called as it’s included in the inherited parent?

I’m on version 3.0.7

using NSpec;
using System;

namespace NSpecExecutionOrder
{
    class parent_class : nspec 
    {
       
        void before_all()
        {
            throw new Exception("!!");
        }
        
    }

    class child_class : parent_class
    {
        void describe_test()
        {
            it["Should Fail"] = () =>
            {
                Console.WriteLine("Never make it here!");
            };

        }

    }
}

@amirrajan Congrats again for RubyMotion 👍

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
serialbandicootcommented, May 11, 2017

I’m back in the office (UK time) tomorrow, so I’ll be able to look over any checks you need, if you keep me posted and I’ll update the issue.

0reactions
BrainCrumbzcommented, May 23, 2017

@serialbandicoot just to mention that PR #192 has been merged recently and it aims solving this issue plus other inconsistencies still related to exceptions thrown in beforeAll/before/act/…

Read more comments on GitHub >

github_iconTop Results From Across the Web

In what order does beforeEach and beforeAll execute?
As you can see, beforeAll will be run before all of your test be executed. beforeEach will be run before each of you...
Read more >
BeforeAll (JUnit 5.4.2 API)
@BeforeAll is used to signal that the annotated method should be executed before all tests in the current test class. In contrast to...
Read more >
beforeAll() executed in parallel with test case in case ...
Test case code should never be executed because beforeAll() did not finish. The error message should be at the beforeAll level and not...
Read more >
JUnit 5 @BeforeAll Annotation with Examples
JUnit 5 @BeforeAll annotation is replacement of @BeforeClass and is used to signal that annotated method should be executed before all tests ...
Read more >
JUnit 5 Test LifeCycle - @Before* and @After* Annotations
The complete lifecycle of a test case can be seen in three phases with ... with @BeforeAll ) then their execution order is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found