Here is an odd one… the application I’m testing you sign up and click a link that is emailed to you. How would I even do that? Would I have to automate logging into outlook?
I assume you mean outlook.com (MS web-based email)? It certainly sounds like that is what you need to do. However, testing all possible paths that scenario might take sounds daunting and effectively impossible (what if the person only uses their phone for email? What about OS-native email clients? Would you use Winium et al?)
The other thing you might consider is “mocking” the emailed-link. That is, do enough to prove the link was sent out, then use a mock link to re-access the site independent of the emailed-link.
Please post back how you choose to approach this - it’s an intriguing problem.
Yes outlook.com, I think its a terrible way to do it as well but first thing that came to mind. I’ll certainly share anything I come up with. I’ve been researching and thinking something like this might work:
Essentially write java that reads from the mail service. That would work but getting the link will be tricky. If I can pull the link out as a variable and pass that into a browse too I could do what I’m trying. Might take me a bit though.
What is the reason behind this scenario? You want to verify generated link is correct in term of its server address and generated activation token if any? Or extend further is when you click on this link the browser will redirect you to successful page?
Anyway in the first case :
- Clean-up the email inbox before this test scenario,any new email matching a pattern like ‘Welcome to my site…’ will be the correct activation email.
- Open this email and search for any text matching with the activation link. Make sure the server address is asserted first,and then assert generated activation token using regex comparison.
You can store the search algorithm to be a variable and paste it directly to a browser
I believe if you really need to test this ,just make sure there is only one emailed-link in the email
Just an ideal to approach this test scenario.
Thanks, Blaze. That Quora thread was interesting.
Whatever you come up with, it would be nice if you could post a generic version (if possible) in the Tips & Tricks forum.
Take your time. I’m sure it’ll be worth it in the end
Addendum: Just saw Vinh’s approach arrive. Yes, that’s interesting too. Vinh’s main point seems to be, you’re not meant to be testing outlook.com – that’s someone else’s job
Testing an email service sounds like it should be out-of-scope of your responsibility to test the application itself. If you know the link that is injected into the email, this should suffice.
do it your java stuff in e.g in JIDEA (maven project) and then create artifacts .jar file
import jar to Katalon (Drivers folder)
create Keyword where call java methods
in Katalon groovy class
//from .jar file
<package. object = new package.java_class_name();
Unfortunately there’s no dependency management tool integrated into the studio, so you would need to download a jar for each external library that you need. Follow this guide: