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

248/test sequencer #497

Merged
merged 4 commits into from
Jul 4, 2022
Merged

248/test sequencer #497

merged 4 commits into from
Jul 4, 2022

Conversation

SimaoBolota-MetaCell
Copy link

Implemented solution: The objective was

  • to add the testSequencer that allows tests to be ran alphabetically and sequentially
  • to add test case for logging in to the application, when applicable

Sanity checks:

  • The pull request is explicitly linked to the relevant issue(s)
  • The issue is well described: clearly states the problem and the general proposed solution(s)
  • From the issue and the current PR it is explicitly stated how to test the current change
  • The labels in the issue set the scope and the type of issue (bug, feature, etc.)
  • All the automated test checks are passing
  • All the linked issues are included in one milestone
  • All the linked issues are in the Review/QA column of the board
  • All the linked issues are assigned

Breaking changes (select one):

  • The present changes do not change the preexisting api in any way
  • This PR and the issue are tagged as a breaking-change

Possible deployment updates issues (select one):

  • There is no reason why deployments based on CloudHarness may break after the current update
  • This PR and the issue are tagged as alert:deployment

Test coverage (select one):

  • Tests for the relevant cases are included in this pr
  • The changes included in this pr are out of the current test coverage scope

Documentation (select one):

  • The documentation has been updated to match the current changes
  • The changes included in this PR are out of the current documentation scope

Nice to have (if relevant):

  • Screenshots of the changes
  • Explanatory video/animated gif

Screenshot at Jun 09 15-26-51
Screenshot at Jun 09 15-27-20
Screenshot at Jun 09 15-27-33

Simão sá added 4 commits June 9, 2022 14:11
Copy link
Collaborator

@filippomc filippomc left a comment

Choose a reason for hiding this comment

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

Thanks @SimaoBolota-MetaCell, dropped a few questions


class CustomSequencer extends Sequencer {
// /**
// * Select tests for shard requested via --shard=shardIndex/shardCount
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is sharding and why is this part commented?

Choose a reason for hiding this comment

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

From my understanding sharding allows for a test suite to be split into arbitrary chunks. It's useful for lengthy test suites, not the case here. Then tests are identified via shardIndex/shardCount.
I left the sharding commented since it was part of the TestSequencer code in the Jest docs. Since the tests aren't being split using shard flag when I ran the tests with or without the sharding section, everything worked as intended.

FYI - Info that I found on sharding:

* Sort test to determine order of execution
* Sorting is applied after sharding
*/
sort(tests) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are tests sorted alphabetically?

Choose a reason for hiding this comment

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

Yes they are sorted alphabetically. The default sort order is ascending, built upon converting the elements into strings so it works as well if the tests are numbered.

@filippomc filippomc merged commit 2414939 into feature/248 Jul 4, 2022
@filippomc filippomc deleted the 248/testSequencer branch September 13, 2022 13:46
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.

2 participants