fix: correct 'Asserion.test_strings' typo in Response Assertion property name - #6753
Open
waterWang wants to merge 1 commit into
Open
fix: correct 'Asserion.test_strings' typo in Response Assertion property name#6753waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…rty name The Response Assertion stores its test strings under the misspelled property name 'Asserion.test_strings' (missing the letter 't') while every other property in the same class uses the 'Assertion.' prefix. This causes property name inconsistency and can lead to parsing issues or unexpected behavior when evaluating assertions, and the typo also leaks into saved .jmx test plans and the schematic XSL rendering. Fixes the constant, keeps backward compatibility by migrating the legacy misspelled property on read, and updates the schematic XSL.
Collaborator
|
I don't think we can rename properties as it would break backward compatibility. There's a lot of scripts like https://github.com/metersphere/chrome-extensions/blob/6bc3f10895fc708a343781aa23ea26bbb7317355/js/JMX.js#L317 which hard-code old name. I'm inclined to close the PR and the issue as "won't do" even though the typo is real. A middle ground could be making JMeter to respond to two property names at the same time so both old and new plugins can talk to the same JMeter core. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the misspelled property name
Asserion.test_strings(missing the letter 't') used by the Response Assertion component. Every other property inResponseAssertionuses theAssertion.prefix; the typo causes inconsistency and leaks the misspelled name into saved.jmxtest plans and the schematic XSL output.Closes #6751
Changes
ResponseAssertion.java— theTEST_STRINGSconstant now uses the correctly spelledAssertion.test_stringsname, and a legacy constant keeps the old misspelled value.getTestStrings()migrates an existing test plan's legacyAsserion.test_stringsproperty to the correctly spelled name on read, so no stored assertion configuration is lost and newly saved plans use the correct name.schematic.xsl— the XSL now selects the correctly spelledAssertion.test_stringsproperty for the assertion schematic.How Has This Been Tested?
NullPropertyhandling already used in this class.ResponseAssertionTestunit tests exercise the getter/setter flows (add/clear test strings), which are unaffected..jmxfiles underbin/testfiles/intentionally keep the legacy name — they serve as regression fixtures proving old plans still load and migrate.