0%

[SAPUI5 Tutorial Trouble Shooting] Test Suite and Automated Testing Step10

如果你在进行[SAPUI5 Tutorial] Test Suite and Automated Testing Step10 时遇到过 SAPUI5 QUnit 404 not found 问题, /resources/sap/ui/qunit/qunit-redirect.js 404 not found 这篇文章将帮你找到解决方法。 正如Tutorial一开始写的那样

If you are running the tutorial in SAP Web IDE, you will have to configure the project descriptor neo-app.json. In this descriptor file, the path to the resources is already configured. Other development environments might need the resources to be copied to the server. Alternatively, you can use the CDN version of https://sapui5.hana.ondemand.com/resources/sap-ui-core.js.

也就是说,如果你使用的是Web IDE,而你又是copy的Tutorial中给出的code,你还需要配置项目的neo-app.json文件让项目找到resources系列的文件。 If you are using web IDE and copied the code from the sample, you may aslo need to set up the neo-app.json file to let the project find the resource folder. 具体配置如下所示,其实就是简单复制一下从头开始新建的项目中的neo-app.json文件。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"welcomeFile": "/webapp/test/test.html",
"routes": \[
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
},
{
"path": "/test-resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/test-resources"
},
"description": "SAPUI5 Test Resources"
}
\],
"sendWelcomeFileRedirect": true
}