tvarchive / optimusTemplate

This is a cucumber jvm implementation template using the optimus mobile automation framework. If you like it, star it, help spread the word.
http://docs.testvagrant.com
66 stars 23 forks source link

Optimus 2.0 hangs after running tests on first Android #6

Closed ochubey closed 6 years ago

ochubey commented 6 years ago

The latest version of the optimusTemplate with Optimus 2.0 used hangs on provided tests with both distribution and fragmentation execution approaches with 2 Android devices.

All tests are executed on one device, but then gradle script hangs with following message in debug mode: 17:55:36.574 [DEBUG] [org.mongodb.driver.cluster] Checking status of localhost:27017 17:55:36.575 [DEBUG] [org.mongodb.driver.cluster] Updating cluster description to {type=STANDALONE, servers=[{address=localhost:27017, type=STANDALONE, roundTripTime=0.7 ms, state=CONNECTED}] gist of the strage behaviour's log: https://gist.github.com/ochubey/a4d7e8d15c5c7554eff29f20f0e9dc5a

UPD: issue resolved by upgrading optimus cli: npm uninstall -g optimus-cli npm install -g optimus-cli

UPD2: but it only fixes an issue for few test executions. UPD3: another way to temporary'fix' this issue is to clean builds and devices collections data of mongodb.

KrishnB commented 6 years ago

@ochubey can you please share your project's TestFeed?

ochubey commented 6 years ago

Sorry, replaced information that cannot disclose with [companyName].

{
  "executionDetails": {
    "appium_js_path": "/usr/local/bin/appium",
    "appium_node_path": "/usr/local/bin/node",
    "monitoring":true
  },
  "testFeed":[
    {
      "belongsTo":"optimus",
      "runsOn": "any",
      "appDir": "/Users/o.chubey/Desktop/",
      "nativeApp":true,
      "optimusDesiredCapabilities": {
        "appiumServerCapabilities": {
          "app": "[companyName]-acctestEnv.apk",
          "platformName": "Android"
        },
        "androidOnlyCapabilities": {
          "appActivity": "[companyName].activities.StartActivity",
          "appPackage": "[companyName].acctest",
          "avdLaunchTimeout": 300000,
          "useKeystore": false
        }
      },
      "deviceState": {
        "captureVideo": true
      }
    }
  ]
}

Anyway, the same issue happens with master branch of the optimusTemplate: https://gist.github.com/ochubey/c2d56f09acdde724fb87940f86b655d4#file-optimusandroidfragmentation-log

KrishnB commented 6 years ago

@ochubey this issue is resolved with the latest optimus version 2.1.2 please update your project dependencies and try again. Lets us know if the issue persists.

ochubey commented 6 years ago

Issues seemed to be resolved. Thank you!