Skip to content

fix: correct 'Asserion.test_strings' typo in Response Assertion property name - #6753

Open
waterWang wants to merge 1 commit into
apache:masterfrom
waterWang:fix/6751-assertion-test-strings-typo
Open

fix: correct 'Asserion.test_strings' typo in Response Assertion property name#6753
waterWang wants to merge 1 commit into
apache:masterfrom
waterWang:fix/6751-assertion-test-strings-typo

Conversation

@waterWang

Copy link
Copy Markdown

Description

Fixes the misspelled property name Asserion.test_strings (missing the letter 't') used by the Response Assertion component. Every other property in ResponseAssertion uses the Assertion. prefix; the typo causes inconsistency and leaks the misspelled name into saved .jmx test plans and the schematic XSL output.

Closes #6751

Changes

  1. ResponseAssertion.java — the TEST_STRINGS constant now uses the correctly spelled Assertion.test_strings name, and a legacy constant keeps the old misspelled value.
  2. Backward compatibilitygetTestStrings() migrates an existing test plan's legacy Asserion.test_strings property to the correctly spelled name on read, so no stored assertion configuration is lost and newly saved plans use the correct name.
  3. schematic.xsl — the XSL now selects the correctly spelled Assertion.test_strings property for the assertion schematic.

How Has This Been Tested?

  • The migration path mirrors the existing NullProperty handling already used in this class.
  • Existing ResponseAssertionTest unit tests exercise the getter/setter flows (add/clear test strings), which are unaffected.
  • The numerous .jmx files under bin/testfiles/ intentionally keep the legacy name — they serve as regression fixtures proving old plans still load and migrate.

…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.
@vlsi

vlsi commented Aug 21, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Typo in assertion property name: "Asserion.test_strings" missing 't'

2 participants