-
Notifications
You must be signed in to change notification settings - Fork 23
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
Failed test does not automatically cause the dependent test to fail #335
Comments
@alekdavis Yes, I thought that ref were already skipped. But I didn't implement it correctly. Behavior now is that on error or when ref is skipped, the actual region is marked as skipped.
I have now removed the file output if you use the ? syntax. When using the script notation, it should point to the respective code line, which makes sense in my eyes. |
@AnWeber I'm sorry, I do not follow.
Are you saying that tests are marked as skipped when they should be marked as failed? Maybe it's the case (I haven't noticed), but my question is not about marks. I am asking if, in a scenario when
What is "script notation"? Do you mean Assertion failures are part of the normal testing process. I just need to know if the assertion was successful or, if it failed, what assertion condition was not met. That's it. Well, the line of code where I invoke the assertion (in my http/rest file) could be helpful (can make it easier to find a failed test), but I have no interest in knowing which line of the extension source code caught the assertion failure. It's just noise. If there is a use case I'm missing, maybe have it show when the log level is higher DEBUG or higher? Sorry about asking so many questions. I'm preparing a presentation for a cross-team demo and need to clarify a couple of things, so I do not present wrong info. |
@AnWeber I think you are doing far and beyond what could be expected, so thank you so much for being patient and replying to the questions. I really appreciate it. And please excuse me for posting often. I'm trying to get httpYac adopted across teams and need to understand a few things, so I can answer questions internally (I have a couple more I need to clarify, but I'll give a break for a few days ;-)). Getting back to the original issues. I'm really sorry, but I still am confused. And even more than before. :-) TEST DEPENDENCY
Are you saying that the behavior is different depending on whether testY is executed alone or as part of a batch? Regardless, I just tried and it does not seem to work like you say it should. Unless I am misunderstanding you. Just to clarify: you are saying that if testX fails, testY will be skipped, right? But it is NOT skipped. Here I run testY alone: Is the screenshot shows, it is NOT skipped. TestY is also NOT skipped when I execute the whole HTTP file (with two tests): Am I totally misunderstanding what you are trying to explain because what I see is not what you seem to be claiming to happen. Are you saying that on your system testY is skipped? Because on mine, it is not, as you can see from the screenshots. LINE NUMBER
I agree 100%. Except that (1) as you can see from the screenshot, the error message does not refer to my code, it refers to the source code of the extension, which is meaningless to me and (2) I am not even using JavaScript tests, I get the line number error from the |
I changed behaviour with v6.16. now it should get skipped |
Ah, right, got a wrong screenshot. But it still does not work with HttpYacRef.mp4 |
Now I understand the problem. If I just run Y, it works correctly the first time. The second time it would no longer execute because of @ref X, since the X has already generated a response and this is now being used. That's why forceRef also works, because X is always executed again here. |
OK, looks like v6.16.2 fixed it for `@ref``. Thank you! |
I can't find the conversation, but I think I read that if test B references test A, and test A fails, test B should be automatically skipped (so no need to use the
$cancel
variable). It was not clarified what a failure means, but I assume that the test fails if (1) at least one of the assertions fails or (2) if the request call fails altogether. If my understanding is correct, then it does not seem to be the case.EXAMPLE:
RESULTS:
P.S. While on the topic, is there a way to not print the
- c:\Users\xxx\.vscode\extensions\anweber.vscode-httpyac-6.15.1\dist\extension.js:177:36504)
part on assertion failures?The text was updated successfully, but these errors were encountered: