Forum Discussion

AkhilaAnumolu7's avatar
AkhilaAnumolu7
New Member
3 years ago

run cucumber selenium in gitlab-ci

Hi,

I have cucumber selenium project and my project is executing fine when i run from the IDE with mvn compile and mvn test commands.

I'm trying to integrate the project with CICD kin gitlab

 

below is my .yaml file which I created

 

image: markhobson/maven-chrome:jdk-11

stages:
  - build
  - test

variables:
  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"

cache:
  paths:
    - .m2/repository/
    - target/


build:
  stage: build
  script:
    - mvn $MAVEN_OPTS clean package
    - mvn compile

test:
  stage: test
  script:
    - mvn test
  artifacts:
    when: always
    paths: 
        - target/surefire-reports/TEST-*.xml
    reports:
      junit:
        - target/surefire-reports/TEST-*.xml
  only:
    - akhila

 

 

I'm getting this error when I run the pipeline

 

loaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.8.2/plexus-compiler-manager-2.8.2.jar (4.7 kB at 14 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0-M7/qdox-2.0-M7.jar (315 kB at 895 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.8.2/plexus-compiler-javac-2.8.2.jar (20 kB at 56 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-java/0.9.2/plexus-java-0.9.2.jar (31 kB at 71 kB/s)
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 26 source files to /builds/electriphi-qa-automation/ui.automation/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /builds/electriphi-qa-automation/ui.automation/src/main/java/bdd/cms/driver/DriverFactory.java:[33,25] cannot find symbol
  symbol:   variable options
  location: class bdd.cms.driver.DriverFactory
[ERROR] /builds/electriphi-qa-automation/ui.automation/src/main/java/bdd/cms/driver/DriverFactory.java:[34,55] cannot find symbol
  symbol:   variable options
  location: class bdd.cms.driver.DriverFactory
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  27.542 s
[INFO] Finished at: 2022-03-03T07:38:53Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bdd.cms: Compilation failure: Compilation failure: 
[ERROR] /builds/electriphi-qa-automation/ui.automation/src/main/java/bdd/cms/driver/DriverFactory.java:[33,25] cannot find symbol
[ERROR]   symbol:   variable options
[ERROR]   location: class bdd.cms.driver.DriverFactory
[ERROR] /builds/electriphi-qa-automation/ui.automation/src/main/java/bdd/cms/driver/DriverFactory.java:[34,55] cannot find symbol
[ERROR]   symbol:   variable options
[ERROR]   location: class bdd.cms.driver.DriverFactory
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

 

 

 Can someone help me why I'm getting the error ?

No RepliesBe the first to reply