7

Tools used:

Java 8
Gradle 4.0
Selenium
Selenium Grid
TestNG
Docker
Bitbucket
Bitbucket pipelines

When I'm executing my tests via bitbucket pipelines I've got these errors:

  1. "Could not complete execution for Gradle Test Executor 2" error (not whole suite executed. Total tests count: 29, executed 9, failed 2. One assertion error and another one is "Could not complete execution for Gradle Test Executor 2"; enter image description here

  2. If I did an execution again sometimes I have this error: "Failed Container 'docker' exceeded memory limit."enter image description here

Everything works fine when I'm running the tests locally. Any ideas on how this can be fixed?

Dimencion Rider
  • 145
  • 1
  • 4
  • 13

3 Answers3

0

Problem was solved by downgrading the TestNG dependency in build.gradle file from 7.0.1 to 6.14.3

Dimencion Rider
  • 145
  • 1
  • 4
  • 13
0

Try to add --debug to your Gradle command and see if there are exceptions that are causing these failures.

I faced a similar problem because Gradle could not find the test listener class. After fixing that, the tests were easily able to run.

0

You probably need to change build.gradle file

for me, at the beginning it was:

test {
    useJUnitPlatform()
}

and it was not working properly

So I needed to change to:

test {
    useTestNG()
}

after that, all the tests are starting as expected.

harmider
  • 373
  • 6
  • 18