I am testing for order flow. After the order is completed, the user will receive two emails. In my test script I am using faker email, so how should I verify/assert that email is actually triggering to a particular email.
I want to assert the email count, not the content. but as I am new to k6 I am troubling to solved it.
Suppose if I load 500 vus then I should check that the email count is 1000.
My test gets passed but I am not able to know whether an email gets triggered or not.
You simply won’t be able to tell that from the client-side as the sending of the email is being done behind-the-scenes on the server-side. If you used real email accounts, then you would be able to programmatically check the account’s inbox using, say, IMAP or SMTP.
I’ve done this in the past with Gmail, where it is possible to send emails to different accounts (e.g. email@example.com, firstname.lastname@example.org, etc.) and have the emails be delivered to the same inbox (email@example.com).
If that’s not an option, then your only remaining option is to gain access to the server-side (logs, or an admin UI of sorts).