A first step is to introduce file base chunking to run-multiple
. Technically we will do
a dynamic expansion of configuration to generate (n) run groups base one the chunks configured.
Context Files:
- codecept.json
- features/example1_test.js
- features/example2_test.js
- features/example3_test.js
- features/example4_test.js
- features/example5_test.js
File: codecept.json
{
"tests": "./featutres/*_test.js",
"multiple": {
"group1": {
"chunks": 2,
"browsers": ["chrome", { "browser": "firefox"}]
},
"group2": {
"browsers": ["chrome", { "browser": "firefox"}]
}
}
}
Object: Configuration object inside CodeceptJS
{
"tests": "./featutres/*_test.js",
"multiple": {
"group1_chunk1": {
"tests": "{features/example1_test.js,features/example2_test.js,features/example3_test.js}",
"browsers": ["chrome", { "browser": "firefox"}]
},
"group1_chunk2": {
"tests": "{features/example3_test.js,features/example4_test.js}",
"browsers": ["chrome", { "browser": "firefox"}]
},
"group1": {
"browsers": ["chrome", { "browser": "firefox"}]
}
}
}
- If grep is set, chunking needs to grep files first and then run the chunking algorhytmn.
Is there a way to run feature files in parallel we are able to run feature files across different chunks but it runs sequentially and not parallel