-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate PDF report for cypress + environment management improvements #1079
Conversation
added functions for login with MFA added example and explained configuration
Login with MFA with Cypress
Improve cypress SUT environment management
added pdf generator script
generate pdf report
Backup branch
Hi @roicarrera, since this PR is also reworking parts of the respective configs, I would propose to use |
reworked config files to be clearer fixed typo in reporterOptions added generate:pdf script to package.json moved folder creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making all the changes. Really improved things around the configs! Only little things left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @roicarrera,
- We need a clear concept for generating reports, screenshots, and videos from our testing Quickstarters. I cannot see clearly how their creation and storing does not affect Jenkins. The only place to store potentially larger files is Nexus.
- Disabling test execution in PROD in the way you did seriously messes with regulations. A solid design involving the core platform team needs to be done to prevent potential damage.
As a general rule, I also suggest creating one PR for one purpose, and not mixing many different things. This will help increase clarity during code reviews.
Build artifacts like screenshots and videos also fit the purpose of analyzing problems in case of broken tests. Yes, you should assure that e2e tests are successful BEFORE you commit. This could be done by running them on a locally running representation of your target system. However, the situation on the cluster is different. In rare cases you are even facing things like flaky tests that are hard to reproduce even on the cluster. In those situations as a developer you are thankful for every piece of information you could get. In this context they fit where they are. However, we should discuss about the right amount of "daysToKeep". Also it would be great to understand, if storing screenshots and videos temporarily even creates a problem regarding storage sizes. Maybe Jenkins already takes care of this. |
upload videos and pdfs to nexus use withCredentials block publish html reports in jenkins do not archive videos
fixed typos
I continued thinking about and like to come back to my previous comment regarding the purpose of the videos:
I still don't see the need for videos being part of any documentation, if there are things like test protocols and screenshots that can be linked to the responsible source code that defines the test scenarios. I'd recommend to keep videos as build artifacts with Jenkins and rather restrict the More important is the following: Imagine every little e2e test run in the cluster leads to an upload of a big video file into Nexus. This will cause additional load in the network, puts pressure on the Nexus instance and consumes a good amount of storage capacity. I'm not aware of how long the concrete documents will be stored in Nexus. If there is no limited data retention, this will cause ever increasing resource allocation, which I don't see to be a sustainable option. @roicarrera @metmajer What are your thoughts about this? |
There is nothing wrong with providing test execution results, screenshots, and videos. As a former software engineer, I can relate to what you say. Since Jenkins is a SPoF, we need to align before using Jenkins as a file store, even for short-term storage. Currently, Jenkin's file system is only 50 MB in size and would exhaust after only a few pipeline runs. As a result, Jenkins would stop working and would refuse to start until disk space has been freed up. Also, our support team would be busy handling support tickets. Additionally, I want to ensure that additional test reports align with the SLC documents we already produce to ensure that the benefit of either type of report is understood internally, and, by our users.
I agree. I believe that we should have a solid reasoning for videos. Whatever we put into our Quickstarters should appeal to 80% of our users, and not be an edge case. Capable users will be able to integrate support for videos should they need it. FYI @roicarrera |
I recently shared the following feedback with @roicarrera. Sharing it here for transparency and record. FYI @cschweikert Those are not only integration tests
-- ods-quickstarters/e2e-cypress/Jenkinsfile.template Lines 74 to 79 in 3f51c8a
-- ods-quickstarters/e2e-cypress/Jenkinsfile.template Lines 86 to 87 in 3f51c8a
-- ods-quickstarters/e2e-cypress/Jenkinsfile.template Lines 83 to 88 in 3f51c8a
and ods-quickstarters/e2e-cypress/Jenkinsfile.template Lines 99 to 101 in 3f51c8a
--
--
--
|
Hm, I wonder if "50 MB" is a typo. When looking into the different *-cd OC projects I saw volume claims of 5 GB or 10 GB. I did some quick experiments regarding filesize of those video files. A test file that does full page reloads every 2 seconds showing different websites in the resolution configured in this QS. Extrapolated to a 60 minutes test run the filesize would be about 0.5 GB. This is about the size of the
I like the idea. I would recommend to remove any record-specifc scripts (e.g.
It will only trigger when the user enables the recording feature. Having it in place is helpful and would also reflect our "opinion" regarding a good setting for things like |
changed return status to unstable if status not 0 made junit not accept empty
Regarding this, the --record flag, and subsequently the e2e:jenkins:record command are for using Cypress Cloud, not for recording videos. The video feature is enabled in the cypress config file. I agree with leaving the video disabled by default tho, and having the users enable it if wanted, but the record command is a separate feature that does not affect Jenkins space |
@roicarrera @cschweikert I can see that the most critical feedback has been addressed. Points left for potential improvement are:
|
remove archive of screenshots removed publishHTML improved README.md
Co-authored-by: Christian Schweikert <[email protected]>
Co-authored-by: Christian Schweikert <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😊
Thanks for bringing in all those changes together!
@metmajer Is there anything open from your end?
Well done @roicarrera and thanks @cschweikert for the support -- LGTM at last :) Please squash-merge into a single commit, thanks |
added mochawesome
added pdf-generator script file
read baseurl on config maps based on environment
added skip for prod