How to run multiple tests sequentially?

We have a appium project in its early stages using webdriverio with appium and utilizing the built in webdriverio test-runner to test our native mobile app. I believe it is "@wdio/local-runner". We just have two tests right now written for android devices. In our wdio.android.conf.js file we define our tests/spec like so:
config.specs = [
‘tests/specs/android/smoke_tests/*’
];
When running the tests, we already have the app spun up on a android simulator/emulator locally and define the simulator in the same wdio.conf.js file. It seems when the tests are triggered via a npm command, wdio see’s both tests and attempts to run them in parallel against the single emulator running and they both fail I think due to them trying to run at the same time. I could be wrong. How can we run them in sequence so test A runs before test B? This is probably something simple but I haven’t been able to figure it out.

Thanks for any help

Here is the documentation for test-runner:

Documentation says:

In order to have a group of spec files run in the same worker process enclose them in an array within the specs array.

So I think change your code to:

config.specs = [
[‘tests/specs/android/smoke_tests/*’]
];

Awesome thank you this worked! I’m guessing with this approach it executes them by alphabetical order?

1 Like

Not sure, and I don’t use this kind of setup, but easy enough for you to test.