SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.74k stars 740 forks source link

Issue with report generation using jest options with selenium CLI #1651

Closed srinivas931 closed 1 year ago

srinivas931 commented 1 year ago

🐛 Bug Report

Running the selenium side runner CLI with jest options to generate xml report does produce the report. While the same command in .bat does not generate the report

Don't seem to find any jest options that could help with providing a custom output directory for the report jest docs

To Reproduce

Steps to reproduce the behavior:

  1. Open Windows command line and execute below script selenium-side-runner -j "\"--reporters=jest-junit"\" -c "goog:chromeOptions.args=[--headless,--nogpu] browserName=chrome" <Side file path> (this generates the 'junit.xml` file under the directory where command is executed)

  2. Create a bat file in the same directory with above command and run the bat file. This is not generating the junit.xml file

Expected behavior

junit.xml report should be generated

Project file reproducing this issue (highly encouraged)

Please provide a project file .side that reproduces this issue.

Issues without a reproduction project are likely to stall.

Environment

OS: Windows 10 Selenium IDE Version: Selenium SIDE Runner Version: 4.0.0-alpha.47 Node version: v16.18.1 Browser: Chrome Browser Version: 113.0.5672.127 (Official Build) (64-bit)

toddtarsi commented 1 year ago

Ugh, there is so much with windows and executables I have been going back and forth on buying a vbox license for windows to use or something idk

toddtarsi commented 1 year ago

I'm sorry for what you're getting here but like what is windows how many executables does it even have, why do i have to support .sh and .cmd.bat.ps1.exe.sh i mean its a bit yakkity sax

srinivas931 commented 1 year ago

This morning was able to figure it out. Referring to jest-junit library it offers setting environment variables JEST_JUNIT_OUTPUT_DIR and JEST_JUNIT_OUTPUT_NAME and this did the job. Thank you @toddtarsi for the response

toddtarsi commented 1 year ago

@srinivas931 - Oh thank goodness, I'm so happy to hear this. Thank you for the update. I've been banging my head on the wall with Windows lately. Luckily @mrgamedev07 saved the day here last time (thank you again!), but I need to get my node stuff together better on Windows really

srinivas931 commented 1 year ago

Thank you @toddtarsi , much appreciate your help

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.