Skip to content

CATROID-1652 Add missing Xstream aliases and fix tests#5201

Merged
wslany merged 1 commit into
Catrobat:release-1.4.0from
reichli:CATROID-1652
Apr 20, 2026
Merged

CATROID-1652 Add missing Xstream aliases and fix tests#5201
wslany merged 1 commit into
Catrobat:release-1.4.0from
reichli:CATROID-1652

Conversation

@reichli

@reichli reichli commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

https://catrobat.atlassian.net/browse/CATROID-1652

This commits fixes the subtype-lookup in ClassDiscoverer thereby fixing the two test classes BricksXmlSerializerTest and ScriptsXmlSerializerTest. These tests then uncovered bricks which are not considered during aliasing in the XStreamSerializer. This commit also adds those bricks to ensure proper serialization.

Apparently it also fixes the tests UpdateVariableInFormulaBrickTest, UpdateVariableInFormulaScriptBrickTest and ScriptsBrickDragNDropListTest. Altogether this fixes roughly 1.000 unit tests which did not run previous to this fix.

Also the catrobat language version was increased to 1.14 to account for the newly added bricks.

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

@reichli reichli marked this pull request as ready for review April 20, 2026 12:53
This commits fixes the subtype-lookup in `ClassDiscoverer` thereby fixing
the two test classes `BricksXmlSerializerTest` and `ScriptsXmlSerializerTest`.
These tests then uncovered bricks which are not considered during aliasing
in the `XStreamSerializer`. This commit also adds those bricks to ensure
proper serialization.

Apparently it also fixes the tests `UpdateVariableInFormulaBrickTest`,
`UpdateVariableInFormulaScriptBrickTest` and `ScriptsBrickDragNDropListTest`.
Altogether this fixes roughly 1.000 unit tests which did not run previous to
this fix.

Also the catrobat language version was increased to 1.14 to account for the
newly added bricks.
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes XML serialization test coverage by improving subtype discovery in test utilities, adding missing XStream aliases for newly introduced bricks, and bumping the Catrobat language version.

Changes:

  • Update ClassDiscoverer Reflections configuration to improve subtype lookup.
  • Add XStream aliases for Plot and Laser Cutter bricks to ensure proper serialization.
  • Increase CURRENT_CATROBAT_LANGUAGE_VERSION to 1.14.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
catroid/src/test/java/org/catrobat/catroid/test/xmlformat/ClassDiscoverer.java Adjusts Reflections scanning configuration used by serializer tests to discover subclasses.
catroid/src/main/java/org/catrobat/catroid/io/XstreamSerializer.java Adds missing aliases for Plot/Laser-related bricks so XML output uses <brick type="..."> consistently.
catroid/src/main/java/org/catrobat/catroid/common/Constants.java Bumps language version to reflect newly supported bricks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@harshsomankar123-tech harshsomankar123-tech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reichli Thanks! LGTM.

@wslany wslany merged commit a949f79 into Catrobat:release-1.4.0 Apr 20, 2026
30 of 31 checks passed
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.

5 participants