简体   繁体   中英

Stress test Rails app with mailers

I have a Rails 3.1 app deployed to Heroku. This app makes heavy use of mailers. I'm looking for a way to run a sort of integration-stress test. In other words, I would like to automate integration tests that cover from user action to email receipt ( not simply delivery ), and I want to use these test to stress-test the app. As Heroku runs everything in production mode, I'm can't run this server-side.

(I'm happy enough to script the actual user interaction, though I'm interested in suggestions. What's really tripping me up is actual email receipt. What would I use to monitor incoming emails? I'd like to not use a separate tool, and I'd prefer not to check that emails were received after testing, as I would like my stress test to also calculate elapsed time between user interaction and email receipt, etc.)

I don't think you can avoid using a separate tool if you actually want to check the messages were received at the end point. I wrote a blog post on a number of options for receiving emails.

Since you're running things locally and don't nessesarily need to be performant it might actually be enough for your tool to connect via pop3 or imap and download the email to check it was delivered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM