*我正在尝试使用Jenkins中的Maven运行邮递员收藏。运行管道时出现以下错误。我可以使用intellij中的“ mvn clean verify”在本地运行这些程序,并且所有测试都可以成功运行。 我有点不知如何解决此问题并寻求帮助。:-
df1 <- structure(list(`1` = c(40.220674, 29.589501, 13.761672, 25.085714,
3.555865, 2.700859, 8.739141, 1.969431), `2` = c(17.3635308,
19.1056911, 10.1045296, 21.4285714, 0.8130081, 0.232288, 6.9105691,
0.232288), `3` = c(17.3635308, 19.1056911, 10.1045296, 21.4285714,
0.8130081, 0.232288, 6.9105691, 0.232288), `4` = c(17.3635308,
19.1056911, 10.1045296, 21.4285714, 0.8130081, 0.232288, 6.9105691,
0.232288), `5` = c(9.867452, 14.285714, 0, 12.223859, 0, 1.325479,
0, 0), `6` = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), `7` = c(0, 10,
0, 0, 0, 2.6315789, 0, 3.4736842), `8` = c(0, 6.842105, 0, 0,
0, 3.684211, 0, 3.684211), `9` = c(0, 1.4736842, 0, 0, 0, 2.6315789,
0, 2.5263158), `10` = c(0, 0.1052632, 0, 0, 0, 2.1052632, 0,
0.1052632)), class = "data.frame", row.names = c("L", "M", "I",
"Y", "W", "K", "S", "V"))
df2 <- structure(list(pep_1 = c("M", "A", "C", "L", "W", "S", "F", "S",
"W", "P", "S", "C", "F", "L"), pep_2 = c("A", "C", "L", "W",
"S", "F", "S", "W", "P", "S", "C", "F", "L", "S"), pep_3 = c("C",
"L", "W", "S", "F", "S", "W", "P", "S", "C", "F", "L", "S", "L"
)), class = "data.frame", row.names = c("1", "2", "3", "4", "5",
"6", "7", "8", "9", "10", "11", "12", "13", "14"))
POM:-
[INFO] --- frontend-maven-plugin:1.6:npm (merge) @ ihtests ---
[INFO] Running 'npm run shipment-tests' in /var/jenkins/workspace/com.tcel_intests_merge/temp
[INFO]
[INFO] > postman-newman-jenkins@1.0.0 shipment-tests /var/jenkins/workspace/com.trakcel_ihtests_merge/temp
[INFO] > newman run test/postmancollection/AcceptValidRequest.postman_collection.json -e test/PostmanEnv/Test.postman_environment.json --reporters cli,junit --reporter-junit-export newman.xml
[INFO]
[ERROR] sh: /var/jenkins/workspace/com.tcel_intests_merge/temp/node_modules/.bin/newman: Permission denied
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 126
[ERROR] npm ERR! postman-newman-jenkins@1.0.0 shipment-tests: `newman run test/postmancollection/AcceptValidRequest.postman_collection.json -e test/PostmanEnv/Test.postman_environment.json --reporters cli,junit --reporter-junit-export newman.xml`
[ERROR] npm ERR! Exit status 126
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the postman-newman-jenkins@1.0.0 shipment-tests script.
Package.json的内容:-
<profiles>
<profile>
<id>merge</id>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<workingDirectory>.</workingDirectory>
<!-- where to install npm -->
<installDirectory>.</installDirectory>
</configuration>
<executions>
<execution>
<id>install-node-and-npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v10.15.3</nodeVersion>
<npmVersion>6.14.8</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<!-- Optional configuration which provides for running any npm command -->
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>merge</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>
**run shipment-tests**
</arguments>
</configuration>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
管道:-
{
"name": "postman-newman-jenkins",
"version": "1.0.0",
"description": "Project for storing postman tests",
"main": "index.js",
"directories": {
"tests": "test/postmancollection"
},
"scripts": {
"shipment-tests": "newman run test/postmancollection/AcceptValidRequest.postman_collection.json -e test/PostmanEnv/Test.postman_environment.json --reporters cli,junit --reporter-junit-export newman.xml"
},
"repository": {
"type": "git",
"url": "git@gitlab.dev.com:test-automation/intests.git"
},
"author": "JJ",
"dependencies": {
"newman": "^5.2.0",
"npm": "^6.14.8"
}
}