Hi All,
I am new to bitbucket pipeline and wanting to run my Selenium functional automated test using the bitbucket infrastructure.
I have a Java based project with Maven as the build management tool. I have tried executing the maven command to run the code on the linux instance but apparently getting Null pointer exception for a resource file as below
<span>java.io.FileNotFoundException: /opt/atlassian/pipelines/agent/build/src/test/resources/testdata/Contact/CreateContact.json (No such file or directory)</span>
<span>at java.io.FileInputStream.open0(Native Method)</span>
<span>at <a href="http://java.io.fileinputstream.open/" rel="noopener nofollow noreferrer" target="_blank">java.io.FileInputStream.open</a>(<a href="http://fileinputstream.java:195/" rel="noopener nofollow noreferrer" target="_blank">FileInputStream.java:195</a>)</span>
<span>at java.io.FileInputStream.<init>(<a href="http://fileinputstream.java:138/" rel="noopener nofollow noreferrer" target="_blank">FileInputStream.java:138</a>)</span>
I have tried logging in the directory files and but it shows that my files are not cloned in the instance created.
This is the yml file I have created.
image: jamesdbloom/docker-java8-maven
clone:
depth: full
pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- maven
script:
- docker run -d -p 4444:4444 --shm-size=2g selenium/standalone-chrome:3.141.59-20210607
- mvn -B verify -Dcucumber.filter.tags="$TAGS" -Dbrowser.type=$BROWSER -DEnvironment=$ENVT -DrunOnRemote=$ON_REMOTE -Dwebdriver.remote.url=$WD_URL
services:
- docker
artifacts:
- target/**.
Attached is the project sturcutre for your reference.