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

It is possible to override result parameters that OpenTAP depends on #1524

Open
alnlarsen opened this issue Apr 25, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@alnlarsen
Copy link
Collaborator

Publishing a result in a test step called Verdict causes OpenTAP to throw an exception later if the verdict of a test step run is queried. This happens because the getter has this logic:

case string r:
  return (Verdict) StringConvertProvider.FromString(r, TypeData.FromType(typeof(Verdict)), null);    

This obviously crashes if Verdict is a string, and it is not a Verdict.

Errors caused due to this are hard to track down because

  1. They are only triggered if a result listener happens to check the step verdict
  2. They are triggered in logic completely unrelated to where the result was published

I think Results.Publish(...) should fail immediately if a result column that OpenTAP depends on would be overwritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant