我在groovy文件中运行Windows命令以在Jenkins Pipeline上运行Postman集合。管道正常运行,但是并没有在相应路径中保存report_date ......文件。
bat '''
newman run src/test/postman/API_postman_collections.json -e src/test/postman/Preproduccion.postman_environment.json -r json,htmlextra --reporter-htmlextra-export target/newman/report.html --reporter-json-export target/newman/report.json --reporter-htmlextra-export target/newman/report_%date:~6,4%-%date:~3,2%-%date:~0,2%_%time:~0,2%:%time:~3,2%:%time:~6,2%.html --reporter-json-export target/newman/report_%date:~6,4%-%date:~3,2%-%date:~0,2%_%time:~0,2%:%time:~3,2%:%time:~6,2%.json -k --suppress-exit-code
'''