Skip to content

Conversation

@ecoussoux-ansys
Copy link
Contributor

@ecoussoux-ansys ecoussoux-ansys commented Nov 27, 2025

This PR performs a refactoring of the tests in tests/system/general/test_07_Object3D.py with the primary objective to make them independent of each other: The relative independence of the reworked tests has been successfully tested locally.
These changes are meant to make testing more efficient (independence enables parallel execution), reliable and to ease future debugging.
Furthermore, a comprehensive review of the tests in particular for relevance and with the aim to improve code style and formatting has been performed.

The implemented changes are listed below :

  • The aedtapp fixture has been improved,
  • The use of a test class for the set of tests defined in the file is dropped,
  • Some variable names are made more meaningful,
  • It was ensured that the methods create_copper_box, create_copper_sphere and create_copper_cylinder are being used everywhere possible throughout the tests,
  • Some tests were renamed / removed / merged and in particular (mentioning the older test names):
    • The test_00_object_performance is removed: No actual performance criteria was defined (time above which the test should fail) & we are using the create_box method literally everywhere in these tests, so I guess that if performance was too bad, the timeout for the tests would be hit..
    • The test_01_bounding_box and test_01_bounding_dimension were merged,
    • The test_08_set_model was removed (was very short and had no assert statement),
    • The test_08A_top_face & test_08B_bottom_face were merged,
    • The test_08C_top_edge & test_08D_bottom_edge were merged,
    • The test_print_object was updated to check slightly differently that the conversions to int was successful,
    • The test_13_delete_self was merged into the new test_delete_object,
    • An assert statement was added to the test_17_section_object,
    • In test_24_filter_faces_by_area & test_25_edges_by_length it was made sure that every part of the test is actually executed,
    • The test_26_unclassified_object & test_26a_delete_unclassified_object were merged,
    • In test_27b_object_suppress, test_27c_object_jsonalize and test_28_set_object_history_properties, some steps (similar to what is done in test_27_get_object_history_properties) are added and performed on the test objects to provide some relevant history for testing,
    • In test_28_set_object_history_properties, it was made sure that every part of the test is actually executed.

Close #6943.

@ecoussoux-ansys ecoussoux-ansys self-assigned this Nov 27, 2025
@ecoussoux-ansys ecoussoux-ansys requested a review from a team as a code owner November 27, 2025 14:08
@ecoussoux-ansys ecoussoux-ansys added the testing Anything related to testing label Nov 27, 2025
@Samuelopez-ansys Samuelopez-ansys enabled auto-merge (squash) November 27, 2025 14:10
@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.67%. Comparing base (a7d72d1) to head (45eb480).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6956       +/-   ##
===========================================
- Coverage   82.12%   52.67%   -29.45%     
===========================================
  Files         247      247               
  Lines       78330    78330               
===========================================
- Hits        64329    41264    -23065     
- Misses      14001    37066    +23065     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

testing Anything related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor tests in test_07_Object3D.py

4 participants