Skip to content

[Feature] Improve test stability with safer access, clearer errors, and better assertions #2491

@EmmaYuan1015

Description

@EmmaYuan1015

Improve test reliability and debuggability with safer optional access, clearer error handling, awaited async actions, and more informative assertions/logging.

  • Safer property access: this.currentTest?.title ?? "unknown" avoids runtime errors.
  • Better error handling: Differentiates between Error objects and other types, providing clearer error messages.
  • Asynchronous operation guidelines: await actionButton.click() ensures the click operation completes before continuing.
  • More useful assertion messages: All assertions have descriptive messages added, facilitating quick problem location when debugging failed test cases.
  • Improved logging output: Includes actual values ​​in assertion messages for easier problem troubleshooting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions