Skip to content

Getting more information about error in CucumberTestObserver #94

Closed Answered by vojtech-cerveny
vojtech-cerveny asked this question in Q&A
Discussion options

You must be logged in to vote
   var errorMessage: String?;
    func didFinish(scenario: Scenario, result: Reporter.Result, duration: Measurement<UnitDuration>) {
    // previous code  + calling errorMessage
    }

    public func didFinish(step: Step, result: Reporter.Result, duration: Measurement<UnitDuration>) {
        switch result {
            case .failed(let description):
                errorMessage = description
            default:
                break
        }
    }

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vojtech-cerveny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant