webdriverio / appium-boilerplate

Boilerplate project to run WebdriverIO tests with Appium to test native applications on iOS and Android
MIT License
437 stars 261 forks source link

[🐛 Bug]: ERROR @wdio/cli:launcher: No specs found to run, exiting with failure #393

Open mishko-misha opened 5 days ago

mishko-misha commented 5 days ago

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.36.1

Node.js Version

v21.7.1

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

I use project https://github.com/webdriverio/appium-boilerplate Every time when I run npm run android.browserstack.app tests for BrowserStack I get error 2024-06-25T14:07:52.225Z ERROR @wdio/cli:launcher: No specs found to run, exiting with failure Screenshot 2024-06-25 170832 I did but unfortunately it didn't help: 1 npm update 2 npm install @wdio/cli@latest --save-dev 3 npm install --save-dev @wdio/browserstack-service But when I run tests on local machine - no problems!

What is your expected behavior?

No response

How to reproduce the bug.

  1. Clone project
  2. Use browserStack (user / key) 3 use npm run android.browserstack.app

more details: https://github.com/webdriverio/appium-boilerplate

Relevant log output

> appium-boilerplate@5.3.1 android.browserstack.app
> wdio run ./config/browserstack/wdio.android.bs.app.conf.ts

2024-06-25T14:07:50.420Z WARN @wdio/config:ConfigParser: pattern ../tests/specs/**/app*.spec.js did not match any file

Execution of 0 workers started at 2024-06-25T14:07:50.421Z

2024-06-25T14:07:50.433Z DEBUG @wdio/utils:initializeServices: initialize service "browserstack" as NPM package
2024-06-25T14:07:50.645Z INFO @wdio/cli:launcher: Run onPrepare hook
2024-06-25T14:07:50.647Z DEBUG @wdio/browserstack-service: Sending SDK event with data {
  userName: '########',
  accessKey: '########',
  event_type: 'SDKTestAttempted',
  detectedFramework: 'WebdriverIO-mocha',
  event_properties: {
    language_framework: 'WebdriverIO_mocha',
    referrer: 'WebdriverIO-mocha/8.39.0',
    language: 'WebdriverIO',
    languageVersion: 'v21.7.1',
    buildName: 'android',
    buildIdentifier: 'undefined',
    sdkRunId: '######',
    os: 'Windows_NT',
    hostname: '########',
    productMap: {
      observability: true,
      accessibility: false,
      percy: false,
      automate: true,
      app_automate: false
    },
    product: [ 'observability', 'automate' ]
  }
}
2024-06-25T14:07:51.173Z DEBUG @wdio/browserstack-service: Funnel event success
2024-06-25T14:07:51.173Z DEBUG @wdio/browserstack-service: app is not defined in browserstack-service config, skipping ...
2024-06-25T14:07:51.174Z DEBUG @wdio/browserstack-service: Sending launch start event
2024-06-25T14:07:52.217Z DEBUG @wdio/browserstack-service: [Start_Build] Success response: {"build_hashed_id":"#####","jwt":"eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJicm93c2Vyc3RhY2tfb2IiLCJzdWIiOiI4NTgwODQxIiwiZ3JvdXBfaWQiOjUzNTQ5OTcsInVzZXJfaWQiOjg1ODA4NDEsImJ1aWxkX2hhc2hlZF9pZCI6ImtzaGlnZzA3YWxlcms5MmU3YnR4dHltMDkwdW5lZHFscTVlcnVoZ2siLCJwcm9qZWN0X25hbWUiOiJ3ZGlvLXRlc3QtcHJvamVjdCIsImhvb2tfYXNfdGVzdCI6IjEiLCJidWlsZF9uYW1lIjoiYW5kcm9pZCIsInByb2R1Y3RfbWFwIjoie1wib2JzZXJ2YWJpbGl0eVwiOnRydWV9IiwiZ3JyX3JlZ2lvbiI6IiIsInNpZ25pbmdfa2V5X2hhc2giOiI1NzhmY2M0MDYwNjg5MjhmMzI3NDY0ZmRjZTA1YmJjM2VhZDdhZWMwMzA3Y2U2YmU1ZDM4ZGFhNDcwMjY0ODk2IiwiaWF0IjoxNzE5MzI0NDY1LCJleHAiOjE3MTk2NzAwNjV9.IK45cg09QBAwofmIScIKeWjhsRcwed0Q7Cxvf6adaio","allow_screenshots":true}
2024-06-25T14:07:52.219Z INFO @wdio/browserstack-service: browserstackLocal is not enabled - skipping...
2024-06-25T14:07:52.220Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 1575ms
2024-06-25T14:07:52.224Z WARN @wdio/config:ConfigParser: pattern ../tests/specs/**/app*.spec.js did not match any file
2024-06-25T14:07:52.225Z ERROR @wdio/cli:launcher: No specs found to run, exiting with failure
2024-06-25T14:07:52.226Z INFO @wdio/cli:launcher: Run onComplete hook
2024-06-25T14:07:52.227Z DEBUG @wdio/browserstack-service: Inside OnComplete hook..
2024-06-25T14:07:52.227Z DEBUG @wdio/browserstack-service: Sending stop launch event
2024-06-25T14:07:52.390Z DEBUG @wdio/browserstack-service: [STOP_BUILD] Success response: ""

Visit https://observability.browserstack.com/builds/##### to view build report, insights, and many more debugging information all at one place!

2024-06-25T14:07:52.393Z DEBUG @wdio/browserstack-service: Sending SDK event with data {
  userName: '######',
  accessKey: '######',
  event_type: 'SDKTestSuccessful',
  detectedFramework: 'WebdriverIO-mocha',
  event_properties: {
    language_framework: 'WebdriverIO_mocha',
    referrer: 'WebdriverIO-mocha/8.39.0',
    language: 'WebdriverIO',
    languageVersion: 'v21.7.1',
    buildName: 'android',
    buildIdentifier: 'undefined',
    sdkRunId: '######',
    os: 'Windows_NT',
    hostname: '########',
    productMap: {
      observability: true,
      accessibility: false,
      percy: false,
      automate: true,
      app_automate: false
    },
    product: [ 'observability', 'automate' ],
    testhub_uuid: '######',
    productUsage: {
      testObservability: {
        enabled: true,
        manuallySet: false,
        buildHashedId: '######',
        events: {
          buildEvents: {
            started: { isTriggered: true, status: 'success', error: undefined },
            finished: { isTriggered: true, status: 'success', error: undefined }
          },
          testEvents: {
            started: { triggeredCount: 0, sentCount: 0, failedCount: 0 },
            finished: { triggeredCount: 0, sentCount: 0, failedCount: 0 }
          },
          hookEvents: {
            started: { triggeredCount: 0, sentCount: 0, failedCount: 0 },
            finished: { triggeredCount: 0, sentCount: 0, failedCount: 0 }
          },
          logEvents: { triggeredCount: 0, sentCount: 0, failedCount: 0 },
          cbtSessionEvents: { triggeredCount: 0, sentCount: 0, failedCount: 0 }
        }
      }
    }
  }
}
2024-06-25T14:07:52.595Z DEBUG @wdio/browserstack-service: Funnel event success
2024-06-25T14:07:53.789Z DEBUG @wdio/cli:utils: Finished to run "onComplete" hook in 1563ms

Spec Files:      0 passed, 0 total (0% completed) in 00:00:03

2024-06-25T14:07:53.791Z INFO @wdio/local-runner: Shutting down spawned worker
2024-06-25T14:07:54.057Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2024-06-25T14:07:54.058Z INFO @wdio/local-runner: shutting down
2024-06-25T14:07:54.060Z DEBUG @wdio/browserstack-service: Exit hook called

Code of Conduct

Is there an existing issue for this?

erwinheitzman commented 5 days ago

Hi there, you used .js instead of .ts

mishko-misha commented 5 days ago

Hi there, you used .js instead of .ts

No reason js or ts. I get the same error. If you open project, you will see in spec using .js for local or browser stack. By the way local everything works fine.

erwinheitzman commented 5 days ago

@mishko-misha the path should be ../../tests/specs/*/app.spec.ts

mishko-misha commented 5 days ago

@mishko-misha the path should be ../../tests/specs/*/app.spec.ts

Please explain it:) what the difference is?

erwinheitzman commented 5 days ago

I added ../ at the beginning because the path was looking in the wrong directory. Additionally I used .ts instead of .js

mishko-misha commented 5 days ago

I added ../ at the beginning because the path was looking in the wrong directory. Additionally I used .ts instead of .js

I added but I get another error, please check logs, screens

log26txt.txt wdioandroidbsappconfig wdioandroidbrowser

erwinheitzman commented 5 days ago

@mishko-misha correct, this is a different issue but can be corrected. The mentioned capabilities in the error from the log are incorrect. You can remove those and copy paste some of the capabilities from the Saucelabs android setup and that should resolve it.

mishko-misha commented 5 days ago

@erwinheitzman thanks a lot, you helped me:)

erwinheitzman commented 5 days ago

You're welcome @mishko-misha let's keep the issue open though because these things should work out of the box and need to be fixed. Would you be comfortable to contribute the changes you needed to make? It would help us out a lot 😉