Need to test whether an email is getting sent to a specific email ID (Gmail) when a specific action is done from the application under test. Can we automate this using telerik test studio?
Yes, this you can validate using Telerik Test Studio but for this you need to add test case of 'Gmail login and checking Inbox'. I will say to use this test case of Mail check as a separate test case in Test Studio and then call it as a Child test case in your Master case, once the particular action is taken. So, your whole test suite will look like this:
Master Test case
- Step1: Login to application
- Step2: Perform action on which mail should be send
- Step3: Extract the subject (if your application uses some different subject for different actions), store this in a variable
- Step4: Validate the message shown in the application after performing action like 'Mail has been sent successfully'
Step5: Call Child test case of verifying mail sent or not
--- Child Test Case --- - Login to Gmail - Open Inbox (if not default) - Validate mail arrived or not, verify the extracted subject from step3 - If not, then add a wait and verify again after refreshing the Inbox
(this is just to ensure that if there is any delay in sending mail then you verify Inbox after that delay too, because sometimes mail sending services have a scheduler which runs after every configured amount of time, lets say after every 5 mins mail will be sent then you should validate the mail received functionality after a time of 5-6 mins.)
For making it more robust you can place Step2 of Mater test case in a 'IF' statement, i.e. if Action is taken then only you need to fire the Child test case else not.
Telerik test studio has a 30 day trail, maybe just try it? I would see no reasons why this could not work.
I would use something like MailTrap to catch emails send from the system under test and then use their API to check the email has arrived from a script/test. This sounds better then logging into gmail to check the email has arrived.