on 2025 Nov 07 10:02 AM
Hello Experts,
our pipeline is failing with below error in the karma step
as we are using piper template to run our pipeline we are using KarmaExecutetests step
when we are the tests in local it is running fine but when we run in the pipeline it failing with below error
<!DOCTYPE html>
<html>
<head>
<title>Unit tests</title>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta charset="utf-8">
<script
id="sap-ui-bootstrap"
src="../../../../resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-resourceroots='{
"exemptiontool.exemptiontool": "../../",
"test/unit": "./"
}'>
</script>
<script src="../../../../resources/sap/ui/qunit/qunit-css.js"></script>
<script src="../../../../resources/sap/ui/thirdparty/qunit.js"></script>
<script src="../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
<script src="../../../../resources/sap/ui/qunit/qunit-coverage.js"></script>
<script>
QUnit.config.autostart = false;
sap.ui.require(
["test/unit/allTests"],
function () {
QUnit.start();
}
);
</script>
</head>
<body>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture"></div>
</body>
</html>below is opa5.qunit.html
<!DOCTYPE html>
<html>
<head>
<title>Integration tests</title>
<meta charset="utf-8">
<script id="sap-ui-bootstrap"
src="../../../../resources/sap-ui-core.js"
data-sap-ui-theme='sap_fiori_3'
data-sap-ui-resourceroots='{
"exemptiontool.exemptiontool": "../../"
}'
data-sap-ui-animation="false"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true">
</script>
<link rel="stylesheet" type="text/css" href="../../../../resources/sap/ui/thirdparty/qunit-2.css">
<script src="../../../../resources/sap/ui/thirdparty/qunit-2.js"></script>
<script src="../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
<script src="opaTests.qunit.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
</body>
</html>
could you please help me here
Best Regards,
Bhanu.
Request clarification before answering.
Hi
This error means the SAPUI5 framework is not found
../../../../resources/sap-ui-core.jsI suppose it is working fine in your test environment, but from your pipeline, it won't be the same environment.
To test, please replace the relative path with the following one:
https://ui5.sap.com/xx/resources/sap-ui-core.js
xx would be the version you want (or nothing to use the last one)
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let me check and get back to you
I have checked it not it is failing with script error
any idea that we can resolve this as well
below is the error message
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.