Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to run selenide tests in bitbucket-pipelines (selenoid)

Vitali Konachyk March 18, 2022

It is necessary to run tests on selenide in selenoid on bitbucket-pipelines, I did everything locally, and it works, but now it is unclear how to implement it in bitbucket. I have no experience writing bitbucket-pipelines.yml

Locally I :
1. Installed docker
2.Launched docker
3. Downloaded the start file (https://github.com/aerokube/cm/releases/tag/1.8.1 ) 4.Launched it with the command '$ ./cm selenoid start --vnc' and '$ ./cm selenoid-launching the user
interface'
5. Launched the tests with the command 'mvn test'

1 answer

1 vote
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2022

Hi @Vitali Konachyk  

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Welcome to the Atlassian Community!

I would like to inform you that Bitbucket Pipelines is a service, which basically runs a Docker image and within the Docker image, it runs commands.

For the basics, how you can get started with Bitbucket Pipelines, I would like to suggest you to read through these set of documentation: https://support.atlassian.com/bitbucket-cloud/docs/get-started-with-bitbucket-pipelines/

Let me give you a template:

image: docker_image_that_you_used_locally

pipelines:

default:
- step:
services:
- docker


script:
- wget https://github.com/aerokube/cm/releases/tag/1.8.1
- ./cm selenoid start --vnc
./cm selenoid-launching
- mvn test

definitions:
services:
docker:
memory: 512

Please let me know how it goes, we're here to help.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Vitali Konachyk March 21, 2022

Hi! 
I supplemented the script, but it didn't help. Not enough accesses(image (2).pngimage (3).png

Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 22, 2022

Hi @Vitali Konachyk  

Thank you for the picture, there was no Docker service initiated, that's why you had this problem.

I edited yesterday's comment with a docker service. 

Can you try that and let me know if it works for you?

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Like Vitali Konachyk likes this
Vitali Konachyk March 22, 2022

Hi! I have updated the dock, but a new problem has appeared


Снимок экрана 2022-03-22 104103.pngСнимок экрана 2022-03-22 104124.png





 

 

Vitali Konachyk March 22, 2022

"x Failed to start: failed to create container: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories"

Vitali Konachyk March 22, 2022
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2022

Hi @Vitali Konachyk ,

Please allow me to step in as Norbert is out of office.

Based on the error message, it looks that the command you are running may be trying to create a Docker container and mount volumes outside $BITBUCKET_CLONE_DIR ($BITBUCKET_CLONE_DIR is the path where your repo is cloned in the Docker container that runs your build).

If so, this is something that is not supported in Pipelines, see below the section "Full list of restricted commands":

I would suggest reaching out to the developers of selenoid (you can create an issue here: https://github.com/aerokube/selenoid/issues), ask what directory is being mounted, and if it is possible to change that e.g. with a configuration file in your repo.

Kind regards,
Theodora

Like Vitali Konachyk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events