codeceptjs / codeceptjs/CodeceptJS

Tests install App and then restarts, never making a connection

Abierto
#2,575 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
4.2k
Forks
757
Merge medio
2 d 9 h
PR fusionados (30 d)
16

Descripción

#### 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.