-1

I am trying to run allure report on a protractor project using the command 'allure serve path-to-allure-results' from cmd terminal however I faced an issue with the path because it has spaces and file is not found by the system, report is generated but is empty:

PS C:\Users> allure serve C:\Users\Cesar Pinto\Desktop\CSC\AutomationProjects\Protractor\Projects\ProtractorDemo\allure-results
Generating report to temp directory...
C:\Users\Cesar does not exist
Pinto\Desktop\CSC\AutomationProjects\Protractor\Projects\ProtractorDemo\allure-results does not exist
Report successfully generated to C:\Users\Cesar Pinto\AppData\Local\Temp\4581725473511580302\allure-report
Starting web server...
2021-06-21 10:30:23.908:INFO::main: Logging initialized @5018ms to org.eclipse.jetty.util.log.StdErrLog
Server started at <http://172.26.0.1:54047/>. Press <Ctrl+C> to exit

In order to escape that space in Cesar Pinto folder I tried adding double quote at the entire path and just the folder with spaces too, single quote, '^' before space, '`' before space, I specified the entire path with the .xml file to be ran and no one worked for me.

Any thoughts on this?

Cesar
  • 49
  • 1
  • 3

1 Answers1

1

I don't have a windows machine to validate my answer, but as far as I remember you need to escape space with \. However, since you use it in your path you may want to escape every \ occurrence itself. So in the end you have something like

allure serve C:\\Users\\Cesar\ Pinto\\Desktop\\CSC\\AutomationProjects\\Protractor\\Projects\\ProtractorDemo\\allure-results
Sergey Pleshakov
  • 7,964
  • 2
  • 17
  • 40