eficode / robotframework-oxygen

Oxygen is a Robot Framework tool that empowers the user to convert the results of any testing tool or framework to Robot Framework's reporting to consolidate all test reporting together regardless of tools used.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Oxygen's doesn't like spaces in the path to its working directory.

kjkaizens opened this issue · comments

Oxygen Fails to Run Tests When the working directory has spaces in the path.
It fails to run the tests and create the output files when there is a space in the directory.

Example:

(virtualenv) kevinjacob@Kevins-MacBook-Pro robotframework-oxygen % robot --listener oxygen.listener tests/atest/oxygen_junit_tests.robot==============================================================================
Oxygen Junit Tests                                                            
==============================================================================
Oxygen's unit tests should pass :: Tests in test_oxygen_cli that r... | FAIL |
JUnitHandlerException: Command "/Users/kevinjacob/Documents/Ongoing Projects/virtualenv/bin/green -j /Users/kevinjacob/Documents/Ongoing Projects/robotframework-oxygen/green-junit.xml /Users/kevinjacob/Documents/Ongoing Projects/robotframework-oxygen" failed with return code 127:
""
------------------------------------------------------------------------------
Oxygen Junit Tests                                                    | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
[ ERROR ] Calling method 'output_file' of listener 'oxygen.listener' failed: JUnitHandlerException: Invalid result file path: expected str, bytes or os.PathLike object, not NoneType
Output:  /Users/kevinjacob/Documents/Ongoing Projects/robotframework-oxygen/output.xml
Log:     /Users/kevinjacob/Documents/Ongoing Projects/robotframework-oxygen/log.html
Report:  /Users/kevinjacob/Documents/Ongoing Projects/robotframework-oxygen/report.html

Debugging this error by:
/Users/kevinjacob/Documents/Ongoing\ Projects/virtualenv/bin/green -j /Users/kevinjacob/Documents/Ongoing\ Projects/robotframework-oxygen/green-junit.xml

says :
zsh: no such file or directory: /Users/kevinjacob/Documents/Ongoing

The Folder structure had a space in the folder called Ongoing Projects
Screenshot 2020-08-17 at 20 29 35

Could not replicate the exact error messages but found the root issue with this:

The test case in question is using the green testing tool to process the xml file. green has a bug where you can't give it arguments with spaces, whether you escape them or not. Therefore if any of the test result files has spaces in the path, there is no way to use green with them.

image

Thanks @JooKop , the issue is thus resolved