Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

AP-745: Improve test speed by utilizing snapshot testing #359

Merged
merged 22 commits into from
Sep 19, 2023

Conversation

0xNeshi
Copy link
Contributor

@0xNeshi 0xNeshi commented Sep 4, 2023

Explanation of the solution

Test execution time reduced from ~40 mins to ~4 mins.

Instructions on making this work

  • run yarn or yarn install to install npm dependencies
  • run yarn compile clean
  • run yarn test

@0xNeshi 0xNeshi added the enhancement New feature or request label Sep 4, 2023
@0xNeshi 0xNeshi self-assigned this Sep 4, 2023
@0xNeshi 0xNeshi force-pushed the ap-745 branch 2 times, most recently from 68bf3d2 to 807f60f Compare September 4, 2023 06:44
@0xNeshi 0xNeshi changed the title Ap 745: Refactor IndexFund tests to use snapshots -> data setup kept as-is Ap 745: Refactor IndexFund tests to use snapshots -> data setup kept as-is (run time from 19 to 10 sec) Sep 4, 2023
@0xNeshi 0xNeshi changed the title Ap 745: Refactor IndexFund tests to use snapshots -> data setup kept as-is (run time from 19 to 10 sec) Ap 745: Refactor IndexFund (run time from 19 to 10 sec) and AccountsUpdate (run time from 17 to 3 sec) tests to use snapshots Sep 4, 2023
@0xNeshi 0xNeshi changed the title Ap 745: Refactor IndexFund (run time from 19 to 10 sec) and AccountsUpdate (run time from 17 to 3 sec) tests to use snapshots Ap 745: Refactor IndexFund (19s -> 10s) and AccountsUpdate (17s -> 3s) tests to use snapshots Sep 4, 2023
@0xNeshi 0xNeshi added the WIP label Sep 4, 2023
@0xNeshi 0xNeshi changed the title Ap 745: Refactor IndexFund (19s -> 10s) and AccountsUpdate (17s -> 3s) tests to use snapshots [WIP] Ap 745: Refactor IndexFund (19s -> 10s) and AccountsUpdate (17s -> 3s) tests to use snapshots Sep 4, 2023
@0xNeshi 0xNeshi changed the title [WIP] Ap 745: Refactor IndexFund (19s -> 10s) and AccountsUpdate (17s -> 3s) tests to use snapshots [WIP] Ap 745: Improve test speed by utilizing snapshot testing Sep 4, 2023
@stevieraykatz
Copy link
Contributor

Clever use of snapshotting! nciely done my dude

@0xNeshi
Copy link
Contributor Author

0xNeshi commented Sep 6, 2023

Clever use of snapshotting! nciely done my dude

The idea came to me in light of my frustrations about the need for long wait times to run tests locally

Copy link
Contributor

@stevieraykatz stevieraykatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. The PR is still marked WIP so I'll leave it uncommitted in case there are things you want to add.

@0xNeshi
Copy link
Contributor Author

0xNeshi commented Sep 7, 2023

This all looks good. The PR is still marked WIP so I'll leave it uncommitted in case there are things you want to add.

The idea is to include updates to all tests in this PR

@0xNeshi 0xNeshi force-pushed the ap-745 branch 2 times, most recently from 1a97461 to 288447c Compare September 18, 2023 07:30
@0xNeshi 0xNeshi changed the title [WIP] Ap 745: Improve test speed by utilizing snapshot testing AP-745: Improve test speed by utilizing snapshot testing Sep 19, 2023
@SovereignAndrey SovereignAndrey merged commit 3970403 into master Sep 19, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request WIP
Projects
No open projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

3 participants