run cucumber selenium tests in gitlab-ci
Hi I have a selenium cucumber project with some tests. The tests worked and the chromeDriver had launch when I run the -mvn clean compile test in my IDE. I created this .gitlab-ci.yml in my project's root: 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 When I run the pipeline, I face this error in the console: Unable to load browser: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '4.0.0-beta-1', revision: '9c03156c2b' System info: host: 'runner-fa6cab46-project-25183469-concurrent-0', ip: '172.17.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.78-coreos', java.version: '11.0.10' Driver info: org.openqa.selenium.chrome.ChromeDriver What can I do for running the tests?8.9KViews0likes16CommentsHow to pass parameters between steps in Cucumber with JS?
Hi guys, I have a small issue with Cucumber and I'm new to it, I have the scenarios below: Scenario: 005 I can checkout successfully when entering valid information at required fields When I enter first name into field First Name Scenario: 006.... And Order Information displays first name correctly I had entered value in the first scenario and I want to pass that value into the 2nd scenario but don't know how6.2KViews0likes1CommentHow to get extend report for scenarios which run parallel in a grid
Hi , Currently I am using extentreports 4.0.9 and able to get report after execution of a scenario/feature . But when I run these scenarios in a grid ( in my remote machine I am running these scenarios in grid for regression ) am not able to get theextent report . Is there any way to get the extend report for the scenarios running parallel in a grid . and also send automatic mail after every scenario execution ( this is also not happening in my case ) . Please guide me through this1.1KViews0likes0CommentsAfter changing Feature file description test executing twice one with new and old description
Hi I have made changes in one of my existing feature file description but did not changes any tags in that feature file or steps and no changes made in test runner file or any stepDefination file and uploaded through git, now when I am executing through jenkins I found that my test scenarios are running twice one with my new feature description and another with old feature description, I am not able to solve this problem, can any one please guide how to solve this.1KViews0likes1CommentAdd necessary library files during runtime when using gradle
Hi, We are using Cucumber in our development process in building a service in AWS. We are using DynamoDb and when we are running tests locally we are using a local instance of DynamoDb. To do this we need to include in the classpath certain library files. We have manged to do this for the test task of gradle but not for the cucumber task Given that these files are in a folder (build/dyanamodb-local) in our project, is there a way to include them in the classpath of the cucumber task?1KViews0likes1CommentCucumber BDD + Serenity - Writing user defined methods
I am learning and using Cucumber BDD, with Serenity. I am writing a global library which will have re-usable methods. These methods are accessible from all classes/java files. I am struggling to understand how to access Webdriver object. Or, if webdriver not needed, can I directly access "element" which comes with selenium?? But the below syntax is throwing error, as "element" is not correct. 1. Should I pass "driver" as parameter for every Global method 2. I access this method from Pages. Should I pass "driver" as parameter. If so, what is the correct way to pass "driver" object to the method below. public class GlobalMethods { public void clickLinkWithText(String text){ System.out.println("Entered into clicklink with text >> " + text); element(By.xpath("//a[text()='"+text+"']")).click(); } }892Views0likes0Comments