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

Performance improvements for the integration tests #581

Merged
merged 4 commits into from
Nov 24, 2024
Merged

Conversation

mikavilpas
Copy link
Owner

perf(tests): use cy.runExCommand in all tests

Instead of typing into the terminal to run ex commands, use the
cy.runExCommand command. I added it to tui-sandbox today, and it uses
the neovim node api via a socket connection. This seems to speed up the
entire integration test suite by about 3-7 seconds (~47 s now on my
machine).

The speedup comes from the fact that we don't have to wait for the
characters to be typed into the terminal, and we don't have to wait for
the output to appear on the screen in order to assert on it.

It also makes the tests more reliable, as in some cases
cy.typeIntoTerminal cannot be used to assert that something does not
exist in the output (since we don't know when the output is done).

dependabot bot and others added 4 commits November 22, 2024 22:36
… with 3 updates

Bumps the npm-dependencies group with 3 updates in the / directory: [prettier-plugin-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson), @tui-sandbox/library and [typescript](https://github.com/microsoft/TypeScript).
Bumps the npm-dependencies group with 2 updates in the /integration-tests directory: @tui-sandbox/library and [typescript](https://github.com/microsoft/TypeScript).


Updates `prettier-plugin-packagejson` from 2.5.3 to 2.5.5
- [Release notes](https://github.com/matzkoh/prettier-plugin-packagejson/releases)
- [Commits](matzkoh/prettier-plugin-packagejson@v2.5.3...v2.5.5)

Updates `@tui-sandbox/library` from 6.1.0 to 7.0.1

Updates `typescript` from 5.6.3 to 5.7.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.6.3...v5.7.2)

Updates `@tui-sandbox/library` from 6.1.0 to 7.0.1

Updates `typescript` from 5.6.3 to 5.7.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.6.3...v5.7.2)

---
updated-dependencies:
- dependency-name: prettier-plugin-packagejson
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@tui-sandbox/library"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@tui-sandbox/library"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Instead of typing into the terminal to run ex commands, use the
`cy.runExCommand` command. I added it to tui-sandbox today, and it uses
the neovim node api via a socket connection. This seems to speed up the
entire integration test suite by about 3-7 seconds (~47 s now on my
machine).

The speedup comes from the fact that we don't have to wait for the
characters to be typed into the terminal, and we don't have to wait for
the output to appear on the screen in order to assert on it.

It also makes the tests more reliable, as in some cases
`cy.typeIntoTerminal` cannot be used to assert that something does not
exist in the output (since we don't know when the output is done).
@mikavilpas mikavilpas enabled auto-merge (rebase) November 24, 2024 15:51
@mikavilpas mikavilpas merged commit 0538679 into main Nov 24, 2024
16 checks passed
@mikavilpas mikavilpas deleted the test-perf branch November 24, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant