Creating HTML reports using Playwright and Artillery

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
please make sure that you're performing any synthetic or load tests against a website you have control over I'm using commit quality because this is mine but please don't use this one because it won't handle the load make sure you have authorization for whatever you're testing when you're looking to perform this kind of load and performance testing thank you and enjoy the video hello this is Jared from commit quality in today's video we've got a quick one about reporting with artillery and playrate this applies just artillery but because we're using playrate I've bulked it in with it this should be a nice quick video but if you've been following my Series so far you've noticed at the moment when we've run everything so let's just run this script which is a log into our page I've also kept the code in from the previous video which doesn't really do anything so we can probably remove that but let's just run this now but all our reporting at the moment we've been looking inside this terminal so um it's not really pretty on the eyes it's quite nicely laid out but we can generate a HTML report which is going to be a lot cleaner than this and that's I want to show you today so let's just clear this down and what we can do is we don't need to change anything with the code nothing with the setup we just need to run some bits extra in the terminal so what I'm going to say is artillery run artillery yaml but then I'm going to pass through an argument that says output result. Json and this can be whatever you want you can name this you know commit quality subscribe to my channel. Json anything this is just going to Output a Json file for us so if I had enter on here it's going to run everything like it would but now what we should see is on the side here we can have a new file called results. Json generated after the test has run so here we are we go results. Json we've got this nice Json format now where we can look through it's all exactly the same so if I was to just search for this you can see users commit quality subscribe there if I go down to the bottom that's what matches up with this one where we've got 15 and we've got all the rest of like HTTP requests and everything else now this is a little bit prettier or you might not think it isn't but this is what I want to show once you've generated your Json artillery actually have a command called report which will basically generate a HTML report based off this Json so I can say artillery and instead of run now we're going to say report and you can see there we've got results. Json now hit enter and we'll see there's a nice HTML file that's been generated based off this result. Json so if I was to reveal this in file explorer and we open it in Chrome now then we've got this lovely report which is a lot easier to see you can see the duration of our everything took when it started completed if we had any errors you've got a bunch of the metrics here you can filter them by browser Matrix you can search for user Matrix and it'll scroll down but look at the tables we've got now which in my opinion is much neater than anything else of course we didn't have much going on like we searching for subscribe but all this done was a console.log so you're not really expect anything here but if we go to bows if we go to browser metrics you can see you've got like the log in here you've got you've got the mfcp for commit quality so it's just a lot nicer to see you can still filter over to your Json output as well which is output in a nice little window nice color coded as well so if you have like a Dell Visual Studio code like me you might find this a lot better cust the metrics obviously get logged out as well so um can I search for login there we are we've got the browser step here which was our custom step we added in of course that would be in the report as well so you can have a little look through and see how it goes so if you're adding extra login like we showed in previous videos then that will also appear here if you if you turn if you turn your report on to report on on extra metrics that will all be output here definitely something I wanted to show one thing that is worth no in though is if I go to artillery which I should have a page somewhere here are and I can put this in the documentation it's worth noting that it states here that this command the report command is going to be deprecated in the next major release of artillery and they then are going to recommend using the dashboard V for visualizing and analyzing any artillery report so you can click into this and I've not um been part of the dash I've not used the dashboard anything on this but as soon as this has been decommissioned I'll be looking into creating a video on this which once again you can see here showing more things it's got a bit more going on with this so just bear in mind that this video will get out of date and we'll be replacing with a dashboard but I could not show you because that's that reporting is what I've been using time and time again as always if you do have any questions or comments please drop them down below a like And subscribe is appreciated I've also enabled super thanks if you want to support the running of my channel on my website as always have a great day thank you for watching
Info
Channel: CommitQuality
Views: 215
Rating: undefined out of 5
Keywords: Coding, Testing, Test automation, Learning, How To Code, Programming, development, dev, Playwright, cypress, software dev, SDET, QA, Learn test automation, Learn to code, How to code, programming tutorials, free tutroials, testing practices
Id: fYem0j4jArk
Channel Id: undefined
Length: 4min 57sec (297 seconds)
Published: Sun Apr 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.