I’m currently testing D365 and creating customer account(s) manually from the frontend. Since there are so many scenarios I need to test which emcompasses different types of customers, I want a faster way to set up test data.The ideal scenario would be for me to generate company data and have the forms filled in and saved.
I spoke to the developers about other ways but 1. No Dynamics API set up so that is not an option
2. The developers will not allow us to do import/export, they’re enforcing us to test only from the frontend. My test automation skills are limited but I did try to do what I could.
What I’ve tried
- Selenium IDE - I successfully filled in an input field with a string but couldn’t work out how to fill in a lookup field. Not ideal since I can’t make selenium create test data like faker.
- C# with Selenium - having problems with authentication. I can’t easily automating logging into my account because I have 2FA. My search led me to https://github.com/microsoft/EasyRepro but the MFA support section doesn’t work for me. I don’t see the option in step 4.
- Form filler extension on Firefox - not accurate even though I tried to edit the custom fields in the settings. Some fields don’t get properly filled in either.
For C# with Selenium (3), I know that setting cookies may be another option but I’m not good at this yet. I learned that you can only set the cookie for the domain that you’re on. But when I tried to visit the dynamics domain, it redirects me to the generic Microsoft login page. That means I’m on a different domain and I’m unable to set the dynamics 365 cookie. Not to mention I don’t know which is the right cookie, I’m guessing at this point. Actually Selenium advises not even to automate this bit: https://www.selenium.dev/documentation/en/worst_practices/two_factor_authentication/
Time is ticking and I haven’t had more time to look into this, so I’ve had to stick with manually creating for now. I’ll use https://addons.mozilla.org/en-GB/firefox/addon/fake-filler/ in some instances even if it isn’t all that accurate.