Closed navinkrishnan closed 5 months ago
Hi @navinkrishnan , which docker image did you use to run the npmExecuteEndToEndTests
step? Seems like, the image does not have the Xvfb
binary.
Hi @srinikitha09
I'm using the image ppiper/node-browsers:18-bookworm
I was able to use the npmExecuteScripts
instead directly like this
npmExecuteScripts(
script: this,
virtualFrameBuffer: false,
runScripts: ['wdi5'],
dockerImage:'ppiper/node-browsers:18-bookworm'
)
Tests are triggering. But ofcourse its failing as I need to setup credentials and base url in a custom way.
What is the significance of virtualFrameBuffer
? why is it not allowed to set to false
for the step npmExecuteEndToEndTests
?
Hi @navinkrishnan ,
I am not sure about the significance of it but even though virtualFrameBuffer: true
, it should be able to run the tests successfully with this image ppiper/node-browsers:18-bookworm
. Did you give it a try?
Hi @srinikitha09 , Yes, I did give a try and with npmExecuteEndToEndTests
and it fails with Xvfb
binary.
I suspect its because of virtualFrameBuffer
, if we can make it as false
it may run.
Hi @navinkrishnan,
In that case, I would assume the docker image used by npmExecuteScripts
step might be this image. If you set the following config and use npmExecuteEndToEndTests
step, it should run fine.
steps:
npmExecuteEndToEndTests:
dockerImage: ppiper/node-browsers:18-bookworm
npmExecuteScripts:
dockerImage: ppiper/node-browsers:18-bookworm
Hi @srinikitha09,
We have update the config file with the steps that you have suggested.
But still we are getting the same error like below
Could you please help us here to fix this issue?
Regards, Prajin
@prajin-op could you please provide the complete logs of the failed build? Also, in your .pipeline/config.yaml
file, please configure additionally,
npmExecuteScripts:
dockerImage: ppiper/node-browsers:18-bookworm
@srinikitha09 Attached the log file for the step npmExecuteEndToEndTests
.
@navinkrishnan Are you running the build on Kubernetes? AFAIU, the build is running on the master node which do not have the docker installed and hence it cannot connect to docker daemon and due to that the configured docker image is not used to execute the wdi5 tests. But if your build is running on the Kubernetes, then you should not face these issues any more.
Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team
to your comment.
Hi @srinikitha09 : Sorry, I missed to respond earlier. Build is running on a JaaS instance.
I have acheived my requirement with the following,
withEnv(["BASE_URL=${base_url}"]) {
withCredentials([usernamePassword(credentialsId: 'pusercf1', usernameVariable: 'wdi5_username', passwordVariable: 'wdi5_password')]) {
npmExecuteScripts(
script: this,
virtualFrameBuffer: false,
runScripts: ['wdi5'],
dockerImage:'ppiper/node-browsers:18-bookworm'
)
}
}
I would expect, this could be achieved with npmExecuteEndToEndTests
as well, but this doesn't work
npmExecuteEndToEndTests(
script: this,
credentialsId: 'pusercf1',
wdi5: true,
runScript: 'wdi5',
baseUrl: 'xxxx',
dockerImage:'ppiper/node-browsers:18-bookworm',
virtualFrameBuffer: false,
)
Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team
to your comment.
Issue got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.
Hi Team,
I wanted to run my wdi5 tests part of the pipeline. The step
npmExecuteEndToEndTests
seems to fit my use case as it does the appropriate credential and baseUrl setup for my wdi5 tests. But unfortunate I run into some failures because of the parametervirtualFrameBuffer
.In the
npmExecuteEndToEndTests.groovy
,npmExecuteScripts
is called with strictvirtualFrameBuffer: true
. Could this value be instead applied from the config ? https://github.com/SAP/jenkins-library/blob/2d56e3f4dc339d523e1f8c692c3d151212849034/vars/npmExecuteEndToEndTests.groovy#L147Following are the error messages I see by having the strict
virtualFrameBuffer: true