-
Notifications
You must be signed in to change notification settings - Fork 56
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
TCK Challenge: Test assertions should not make implementation-specific assumptions #1703
Comments
From my point of view, this is a valid challenge. @arjantijms @BalusC @tandraschko do you agree? |
At a glance it indeed seems valid. For the current version we should exclude those tests then, or, if reasonably possible, update the tests in such a way that no new or different functionality is tested and then ask for the common exception (contradictio in terminis, I know) again to allow the update. @BalusC wdyt? |
@BalusC any input? Thanks! |
Completely correct.
Test should be rewritten if
Test should be rewritten to check if
Test should be rewritten to check if the function behind |
@BalusC @arjantijms given the discussion here I think we can accept this challenge. |
I can open a new challenge, if desired, but as we peel the onion on some tests blocked by other challenges I've found 2 more tests that would fit here: Both tests are explicitly testing that injected Contexts are the |
@arjantijms are you ok adding the tests above from @brideck or would you prefer a new challenge? |
Remove assertion of rendered markup; asserting behavior was sufficient
Test should assert if ELException is thrown, not inspect its message
Fix failing assertion of ViewExpiredException class
Addressed by #1728 which updated the tests and should complete the challenge. |
Challenged Tests:
ee.jakarta.tck.faces.test.javaee8.commandScript.Spec613IT#testCommandScript
ee.jakarta.tck.faces.test.servlet40.el.Spec1337IT#testResourceEL3
ee.jakarta.tck.faces.test.servlet30.ajax.Issue3097IT#testViewExpired1
TCK Version:
Jakarta Faces 4.0.x
Tested Implementation:
Open Liberty -- containing MyFaces 4.0
Description:
The challenged tests all have assertions that are making assumptions based off of the output that Mojarra produces:
Spec613IT -
The test is checking that the web response contains the string
">var foo=function(o){"
. Unfortunately, MyFaces produces the slightly different output of">var foo = function(o){"
so the test fails. These are obviously the same string on a fundamental level.Spec1337IT -
The test is checking that the page contains the phrase
"contains more than one colon"
. Not having run the TCK with Mojarra, I can't say exactly what the context of this phrase is, but given the nature of the test this is probably either part of an error message or exception text. MyFaces throws an exception here that clearly indicates that there is a problem with the resource, but does not contain this specific text:Issue3097IT -
The test is checking the result page for the string
"class jakarta.faces.application.ViewExpiredException"
. With MyFaces, the correct exception (ViewExpiredException) is thrown and surfaced in the result page, but the result does not contain the"class"
keyword, so the test fails. Without knowing the full context of Mojarra's result page it's hard to say why the test writer would have found it necessary to include"class"
in the assertion text. Checking for"jakarta.faces.application.ViewExpiredException"
should be sufficient to verify correct behavior.These tests need to be rewritten in an implementation-neutral fashion for a future release of the Faces TCK.
The text was updated successfully, but these errors were encountered: