Skip to content

(Angular UI) Analyze tests for possible optimization & refactoring (remove duplication) #928

@tdonohue

Description

@tdonohue

In today's meeting (Oct 29, 2020) it was noted that we have a lot of repetitive/duplicative tests (in both REST API and Angular UI)

At some point, we may wish to do an analysis of existing tests & find ways to decrease code & test duplication. This work is low priority (as currently we are more concerned with increasing test coverage), but has several key benefits:

  • May help speed up tests (as duplicative tests can be removed without code coverage decrease)
  • May help make tests easier to review/understand (ideally test methods are smaller, easier to follow)
  • May help make code refactoring easier (as there's fewer tests to update after a code/logic change)

Possible strategies include:

  • Possible strategies for Angular testing discussed in this blog post: https://christianlydemann.com/complete-guide-to-angular-testing/
  • We may also wish to increase end-to-end (e2e) tests. These have been difficult to write & keep stable as the application is under heavy development. Once the application is stable, we should revisit and write more e2e tests.

This ticket is a placeholder, as much more discussion would be needed to determine the best strategy/approach. Currently, as stated, our test frameworks works well as-is, but we are already noticing unnecessarily large test methods & code/test duplication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code taskneeds discussionstaleThis issue or PR is stale because it has not been updated in a long time.

    Type

    No type

    Projects

    Status

    ✅ Done / Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions