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

Add integration and E2E testing #67

Open
janechu opened this issue Sep 9, 2021 · 0 comments
Open

Add integration and E2E testing #67

janechu opened this issue Sep 9, 2021 · 0 comments
Assignees
Labels
category:stability Enhancing stability by updating underlying dependencies/code or adding testing mechanisms chore Maintenance or non-code work
Milestone

Comments

@janechu
Copy link
Contributor

janechu commented Sep 9, 2021

What package(s) should this feature be added to?

@microsoft/fast-tooling
@microsoft/fast-tooling-react

Summary

FAST Tooling Testing

General FAST tooling testing strategy

When it comes to testing strategy, the overall philosophy is that unit testing is the first and largest pillar. Since unit tests are the most performant tests, a high percentage of code coverage is expected to be reached for the FAST tooling repository testing in each package. For integration tests and E2E tests, these are more costly. They require a setup of an application to mock a single scenario as an integration test, or a full application to do an E2E test. These should not test edge cases, but should follow the "happy/critical path" that the user is expected to take.

Unit tests

What should be covered:

  • Unit tests for each web component and react component
  • Unit tests for utilities & classes

What technologies should be used:

  • Mocha, Karma, Chai for web components & JS utilities
  • Jest, Enzyme for react components
  • Argos CI/Applitools for visual testing of react/web components

Integration tests & E2E tests (smoke test)

Setup

The integration and E2E tests should use a single web-component-editor application which includes all available components and services and a list of user interaction workflows.

What should be covered:

  • Test interactions and updates between services and components to ensure they stay in sync, these include:
    • Navigation updates
    • Data updates
    • Schema updates
    • Validation updates

What technologies should be used:

  • Playwrite - This should be a good compromise between ease-of-use and local environment setup, it has better focus handling than Karma etc., because it opens the actual browser.
    • File naming should mimic FAST naming, my-component.pw.spec.ts
    • Playwrite has a test suite built in (no need to use mocha/chai)
    • Use local webpack applications instead of a fixture/harness structure to run tests

Requirements

  • Update this main issue with issues for adding Playwrite and related testing for E2E and integration tests
  • Add an investigation issue for visual testing the react/web components, this should be committed to the backlog until such time that the visuals are updated to match new FAST component visual updates

Tasks needed for completion

@janechu janechu added the chore Maintenance or non-code work label Sep 9, 2021
@janechu janechu self-assigned this Sep 9, 2021
@janechu janechu added this to Triage in Tooling via automation Sep 9, 2021
@janechu janechu added this to Triage in Tooling React via automation Sep 9, 2021
@janechu janechu moved this from Triage to Backlog in Tooling Sep 9, 2021
@janechu janechu moved this from Triage to Backlog in Tooling React Sep 9, 2021
@janechu janechu changed the title [Feature]: Add issues for integration and E2E testing Add issues for integration and E2E testing Sep 9, 2021
@janechu janechu changed the title Add issues for integration and E2E testing Add integration and E2E testing Sep 9, 2021
@janechu janechu added the category:stability Enhancing stability by updating underlying dependencies/code or adding testing mechanisms label Sep 13, 2021
@janechu janechu added this to the Release 2 milestone Oct 4, 2021
@janechu janechu moved this from Backlog to To do in Tooling Jan 5, 2022
@williamw2 williamw2 modified the milestones: 2, 3 Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:stability Enhancing stability by updating underlying dependencies/code or adding testing mechanisms chore Maintenance or non-code work
Projects
Tooling
To do
Development

No branches or pull requests

2 participants