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

[BUG] Assertions are being ran twice when test step is open #808

Open
BachmannKarlHendrik opened this issue May 3, 2024 · 0 comments
Open

Comments

@BachmannKarlHendrik
Copy link

Environment

Windows 11
SoapUI 5.7.2

Description

When tests are being ran through TestCase editor, and the particular test step is currently open, then that particular test step's assertions will be ran twice. If the particular test step is closed, the assertions in that test step will run only once. This bug makes tests where assertions are applied only on certain conditions (eg on a second run only), the test results will become ambiguous.

Steps to reproduce

  1. Create a groovy test step:
    testRunner.testCase.setPropertyValue("runCount","0")

  2. Create a Http request test step (for example GET http://github.com). Add script assertion:
    int currentRun = Integer.parseInt(messageExchange.modelItem.testStep.testCase.getPropertyValue("runCount")); messageExchange.modelItem.testStep.testCase.setPropertyValue("runCount", (currentRun + 1).toString());
    That basically counts, how many times the assertion is run.

  3. Close all windows (in SoapUI) and open TestCase Editor. Run the tests from there.

  4. Check under TestCase Custom properties, there will be written "runCount = 1".

  5. Now open Http request test step, and rerun the tests from TestCase Editor.

  6. Check under TestCase Custom properties, there will be written "runCount = 2", even though the value was reset by the groovy script beforehand and thus should still be 1.

Expected outcome

Whether or not the test step is open, the assertions will still be run once.

Project for reproducing the issue

The issue can be reproduced with this project: ProjectForReproducingIssue.zip

@BachmannKarlHendrik BachmannKarlHendrik changed the title Assertions are being ran twice when test step is open [BUG] Assertions are being ran twice when test step is open May 3, 2024
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

No branches or pull requests

1 participant