Closed EszterBalog closed 1 year ago
As you refer to JAAS
I assume you have also access this package which does all the necessary configuration:
npm install --save-dev @sap/piper-karma-config
@CCFenner Hi Christopher,
Thank you very much for your hint. Unfortunately I'm new to this npm topic, so I would need some help again. I’ve tried to use the npm install --save-dev @sap/piper-karma-config but I get this error when the npm is trying to install the @sap/piper-karma-config:
11:46:31 error karmaExecuteTests - npm ERR! code E404
11:46:31 error karmaExecuteTests - npm ERR! 404 Not Found - GET https://int.repositories.cloud.sap/artifactory/proxy-deploy-releases-hyperspace-npm/-/@sap%2fpiper-karma-config
11:46:31 error karmaExecuteTests - npm ERR! 404
11:46:31 error karmaExecuteTests - npm ERR! 404 '@sap/piper-karma-config@0.11.3' is not in this registry.
11:46:31 error karmaExecuteTests - npm ERR! 404
Could you help me what should be the right link for this dependency? In the browser I can find the dependency here: https://int.repositories.cloud.sap/artifactory/proxy-deploy-releases-hyperspace-npm/%40sap/ I’ve also added the @sap/piper-karma-config to my package.json file: https://github.tools.sap/IBP-CTAT/openui5-sample-app/blob/karmaInstall/package.json
I’m trying to run this project in JAAS: https://github.tools.sap/IBP-CTAT/openui5-sample-app.git
I’ve created a .npmrc file also to override the default registry settings: https://github.tools.sap/IBP-CTAT/openui5-sample-app/blob/karmaInstall/.npmrc
The install.sh contains the npm commands which I run in the groovy script of the Jenkins job: https://github.tools.sap/IBP-CTAT/openui5-sample-app/blob/karmaInstall/install.sh The groovy script code is:
@Library(['piper-lib','piper-lib-os']) _
pipeline{
agent any
stages{
stage('Tests'){
steps{
git credentialsId:'GITHUB_USER', url:'https://github.tools.sap/IBP-CTAT/openui5-sample-app.git', changelog: false, poll: false, branch: params.GitBranch
karmaExecuteTests(script: this,
sidecarImage: 'selenium/standalone-chrome:latest',
installCommand:'bash install.sh'
)
archiveArtifacts '**/target/**'
}
}
}
}
Thanks in advance for your help! Best regards, Eszter
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.
We would like to execute automated tests with Karma. Our starting project is https://github.com/SAP/openui5-sample-app, which runs perfectly on local machine. We have tried to call the KarmaExecuteTest groovy script from out job in JAAS jenkins but get an: "No binary for ChromeHeadless browser on your platform. Set "CHROME_BIN" env variable" error. We tried it with headless chrome as well, but the same error comes up. Below I attached the respective log snippet from the job execution.
We have created a copy of this project in our organization. The branch main contains the original code. Here is the groovy script we use in case of running the job with the openui5-sample-app's code.
Thank you, best regards Eszter