Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more robust error handling. #180

Closed
jangalinski opened this issue Jul 21, 2022 · 0 comments
Closed

more robust error handling. #180

jangalinski opened this issue Jul 21, 2022 · 0 comments
Assignees
Labels
Priority: MUST MUST be implemented for the next milestone. Type: enhancement New feature or request
Milestone

Comments

@jangalinski
Copy link
Contributor

When something fails "behind the scenes" (events can not be created because they are invalid, axon setup not working, ...) all tests become just "red", instead single steps failing.
It can be hard to debug/analyse what actually failed.

Typical exception: GIVEN/WHEN had issues, jgiven continues and has invalid state:

15:00:18.308 [main] ERROR c.t.jgiven.impl.ScenarioExecutor - The field resultValidator is required but has not been provided.
com.tngtech.jgiven.exception.JGivenMissingRequiredScenarioStateException: The field resultValidator is required but has not been provided.
	at com.tngtech.jgiven.impl.inject.ValueInjector.updateValues(ValueInjector.java:115)
	at com.tngtech.jgiven.impl.ScenarioExecutor.updateScenarioState(ScenarioExecutor.java:239)
	at com.tngtech.jgiven.impl.ScenarioExecutor.access$500(ScenarioExecutor.java:41)
	at com.tngtech.jgiven.impl.ScenarioExecutor$StageTransitionHandlerImpl.enterStage(ScenarioExecutor.java:172)
	at com.tngtech.jgiven.impl.intercept.StepInterceptorImpl.intercept(StepInterceptorImpl.java:80)
	at com.tngtech.jgiven.impl.intercept.ByteBuddyMethodInterceptor.interceptSuper(ByteBuddyMethodInterceptor.java:37)

Ideas:

  • wrap the calls to axon-test/ResultValidator in try/catch
  • instead of lateinit try to create usable scenarioStates/stateHolders so we can continue the test runs even if we can not really assert state.
@jangalinski jangalinski added this to the BACKLOG milestone Jul 21, 2022
@jangalinski jangalinski added the Priority: MUST MUST be implemented for the next milestone. label Jul 21, 2022
@jangalinski jangalinski modified the milestones: BACKLOG, 0.3.0 Jul 25, 2022
@jangalinski jangalinski self-assigned this Jul 25, 2022
@jangalinski jangalinski added the Type: enhancement New feature or request label Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MUST MUST be implemented for the next milestone. Type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant