codeceptjs / codeceptjs/CodeceptJS

Tests install App and then restarts, never making a connection

Aperta
#2,575 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
4.2k
Fork
757
Merge medio
2g 9h
PR unite (30g)
16

Descrizione

#### What are you trying to achieve?
Running tests in Appium with IOS
#### What do you get instead?
Running tests install the app but then restarts it and no connection is made, it restarts multiple times, and I get to see theLogin Screen but goes back to home screen immediately
> Provide console output if related. Use `--verbose` mode for more details.

```bash
Select a Station
Emitted | test.before ([object Object])
2020-09-10T07:53:48.724Z ERROR webdriver: Request failed with status 200 due to Error: Response has empty body
2020-09-10T07:53:48.725Z ERROR webdriver: Error: Response has empty body
at getErrorFromResponseBody (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/utils.js:110:12)
at WebDriverRequest._request (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/request.js:149:56)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async startWebDriverSession (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/utils.js:41:16)
at async Function.newSession (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/node_modules/webdriver/build/index.js:44:23)
at async Object.remote (/Users/javierjimeno/E2ETesting/node_modules/webdriverio/build/index.js:75:20)
at async Appium._startBrowser (/Users/javierjimeno/2ETesting/node_modules/codeceptjs/lib/helper/Appium.js:234:24)
[1] Error | Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible
Emitted | test.failed ([object Object])
✖ "before each" hook: codeceptjs.before for "Select a Station" in 52180ms
[1] Error | Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible
Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible
```

> Provide test source code if related

```js
// paste test
```

### Details

* CodeceptJS version: 2.6.10
* NodeJS Version: 14.1.0
* Operating System: macos
* webdriverio 5.23.0
* Configuration file:

```js
exports.config = {
tests: './*_test.js',
output: './output',
helpers: {
Appium: {
app: `/Users/${require("os").userInfo().username}/Library/Developer/Xcode/DerivedData/Build/Products/Release-iphonesimulator/ABC.app`,
platform: 'iOS',
device: 'iPad Pro (12.9-inch)',
desiredCapabilities: {
automationName: 'XCUITest',
platformVersion: "12.4"
}
},
ChaiWrapper : {
require: 'codeceptjs-chai'
},
CmdHelper: {
require: 'codeceptjs-cmdhelper'
},
Common: {
require: './Helpers/common_helper.js',
}
},
include: {
I: './steps_file.js'
},
gherkin: {
features: './features/*.feature',
steps: ['./step_definitions/steps.js']
},
bootstrap: null,
mocha: {},
name: 'E2ETesting',
plugins: {
retryFailedStep: {
enabled: true
},
screenshotOnFail: {
enabled: true
}
}
}
```
Appium Logs:
https://gist.github.com/javjim/83a9e66b1d47b8f6ef2183802e3cbb57

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.