Skip to content

[BUG] testProject.testMatch |Array<string>| not respecting the order of file names in the array during execution #10150

Description

@vsravuri

Context:

  • Playwright Version: [1.16.3]
  • Operating System: [Mac]
  • Node.js version: [16.12.0]
  • Browser: [All]
  • Extra: [N/A]

Describe the bug
I have 3 spec files in test folder

Screen Shot 2021-11-08 at 1 05 52 PM

Here is my config file

Screen Shot 2021-11-08 at 1 06 11 PM

When i run the test with one worker, files are not executed in the order mentioned in testProject.testMatch Array

As per documentation, testMatch support Array of files
https://playwright.dev/docs/next/api/class-testproject#test-project-test-match

Actual:

pw1_test_spec.js
pw10_test_spec.js
pw2_test_spec.js

Expected:

pw1_test_spec.js
pw2_test_spec.js
pw10_test_spec.js

Screen Shot 2021-11-08 at 1 05 42 PM

Noticed the same behavior if i use

testMatch: '*_test_spec.js'

Kindly let me know if i am doing something wrong here.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions