Skip to content

Conversation

@gayanW
Copy link
Contributor

@gayanW gayanW commented Nov 28, 2025

Add sample Karma project and GitHub workflow that record tests to https://app.launchableinc.com/organizations/launchableinc/workspaces/rocket-car-karma

- name: Run subset of tests
run: |
export KARMA_FILES=$(cat subset.txt | jq -R -s -c 'split("\n")[:-1]')
npx karma start --single-run No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you run tests two times?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

First it runs all the tests. The second it runs just the subset. This also helps to make sure that subset file is formatted correctly.

Copy link
Contributor

@ono-max ono-max Dec 1, 2025

Choose a reason for hiding this comment

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

Do we need the first run, executing all tests? Can we change it to the usual workflow as follows?

  1. record build
  2. subset
  3. << Run the subset >>
  4. record tests

Copy link
Contributor

@ono-max ono-max Dec 1, 2025

Choose a reason for hiding this comment

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

If not, I'd appreciate it if you could add the comment to your code regarding why the current flow is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So for example, let's say subset returns foo.spec.js. Then we run just the subset (foo.spec.js), and record results. The problem in this case is that bar.spec.js will never be run, or recorded.

If the workflow steps are not clear, I can add a comment on top explaining the flow.

Copy link
Contributor

Choose a reason for hiding this comment

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

So for example, let's say subset returns foo.spec.js. Then we run just the subset (foo.spec.js), and record results. The problem in this case is that bar.spec.js will never be run, or recorded.

Yes. That's the PTS, right? By reducing the number of running tests, we can reduce the execution time.

@gayanW gayanW requested a review from ono-max December 1, 2025 07:42
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.

3 participants