Backup-Testing Strategy

Testing Strategy

Web UI Testing Strategy

  • External Libs
  • Pure Components
  • Pages
    • Split the pages into multiple component and write unit test for each
    • Mock all dependencies do assertions
    • Write integration test
  • States Manager(Redux):
    • Pure Actions: No need for test, its just return a object, you may pay extra effort on it. (TODO: Skip the jest coverage report for actions?)
    • Reducers: Should all be tested with edge cases to make sure the state is actually changing as expected.
    • Thunks: Simply mock the dispatch and test with haveBeenCalledWith()

Orchestration Testing

  • Write test on:
    • Mock Data Response
    • Mocked Error Response
    • Mocked Raw Data Response
    • Error Handling
    • Integration Test
Powered by Remix
|
Designed by szhshp
|
Copyright © szhshp 2022