SeleniumHQ / selenium-ide

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

Export macro in Qualys Browser Recorder format #1732

Closed MarioTesoro closed 7 months ago

MarioTesoro commented 7 months ago

🚀 Feature Proposal

I was implementing a custom script to convert .side files into the format returned by Qualys browser recorder. It would be nice to have this option already integrated into the selenium IDE and/or selenium-side-runner.

Motivation

Macro testing is only possible with the selenium-side-runner in CI/CD while Qualys or other tools are not able to import .side files. It might be useful to add this type of export of .side files to the others.

Example

By selecting the desired output method for this functionality in the selenium-side-runner or through the selenium IDE you would receive as a result the .side converted also in this format.

toddtarsi commented 7 months ago

@MarioTesoro - V3 or V4?

I don't really touch v3 anymore as web extension manifest v3 is kind of its death knell (unable to use execute script any more for example).

However, in v4 this would be pretty painless for the following reasons:

  1. You can add project level extensions.
  2. Extensions are compatible with node style require statements (you can publish side-v4-code-export-qualys to npm for example, and if the side file is in a directory with a package.json and that's been installed, it will work with both the ide and the side-runner)
  3. There is a nice boilerplate for it already: https://github.com/SeleniumHQ/selenium-ide/tree/trunk/packages/side-example-suite (the ts to js stuff would have to be re-rolled if you want typed src files, but all and all its not too bad a workflow i don't think)
MarioTesoro commented 7 months ago

@toddtarsi for V4 should be ok. I think the main problem is to test that the output produced following the conversion is the same as that produced by the Qualys browser recorder. I guess the only way to do this is to compare the converted .side files with those produced by the Qualys Browser recorder. Do you have other ideas on how to test more easily?

toddtarsi commented 7 months ago

@MarioTesoro - I kinda live under a rock and don't know too much about Qualys unfortunately. I think whatever method works best for you here is best. I'd maybe recommend like having a few side files that do the important things with Qualys, and then a github action on the package that maybe uses the @seleniumhq/side-code-export package to build the Qualys tests with your export format from the Side files. And then you can use your Qualys test runner to run them, and it passes if all your Qualys tests succeed. That sound alright? You can verify syntax too if you want a sanity test, but surprise surprise I'm a big fan of heavily using e2e testing.

toddtarsi commented 7 months ago

@MarioTesoro - I'm going to close this as an issue, and if you're still doing this stuff, please just make new ones for any issues you encounter. Thanks and have a good one!

github-actions[bot] commented 6 months 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.