How can i test using multiple users , a sign up page with OTP using jmeter - testing

My website has an OTP authentication at the time of registering to the website. I need to pass the otp that is send to both email id and mobile number into the next page, register and do rest steps in the website. I need to do it with 500 users. Please help me, if there is any solutions

You can use JMeter's Mail Reader sampler (maybe in combination with Regular Expression Extractor) to get the OTP from the email message generated by your system, store it into a JMeter Variable and use in login request.
See How to Create a JMeter Script to Check Email During Registration AND Grab the Confirmation URL article for detailed steps.
If you need do to it for 500 users I guess you'll need to have 500 email accounts, so you might need to use CSV Data Set Config to read keep email/password pairs from .csv file.

Related

How to use ParseHub to scrape website behind a login and two factor authentication through Google Authenticator?

I'm trying to scrape data from HubSpot using ParseHub but not only do I have go through the login page everytime (which is easy because I've set it up to automatically enter my email and password), I also have go through two-factor authentication, which is not easy because: one, it's randomised so I can't keep putting the same six-digit number in; two: because I only have Google Authenticator on my phone which means it's impossible for me to scrape the six-digit number. Just to note, I am able to get past 2FA on Test Runs, because of the "Step in" feature of ParseHub. This allows me to manually enter the six-digit code everytime. Unfortunately, this feature is not available on the live run, which means the script basically fails at the 2FA stage and no data is scraped.
I've downloaded the Google Authenticator extension to my PC, but I have no idea how to have the same account for 2FA for HubSpot that I have on my phone, be present on my PC. If I was able to achieve that, I'm pretty sure I would be able to scrape the six-digit code.
Any help would be greatly appreciated.

Is It Possible To Use An External Database For User Data & Login Credentials With Shopify?

Our client has asked us to build a Shopify site that ties into their in-house customer db (with or without using Salesforce). Is this even possible? Does Shopify support any method of cross-site database querying?
The only thing I can think of to accomplish this is to write a webhook on their in-house server with a simple read-only mini DB query API. However, as that I'm not super familiar with Shopify's more obscure capabilities (and having already spent quite some time sifting through their docs and running google searches on the matter with absolutely zero results), I'm not even sure if this is possible.
Are we barking up an impossible tree, or is this something that can actually be accomplished?
Thank you in advance for any help you can give.
What I have understood from your description is you already have an external database with user login details and you want to use the same for authentication in Shopify. If yes, then it is possible with Shopify Multipass feature. This feature is only available for Shopify Plus plans. From the Shopify Multipass docs
Multipass login is for store owners who have a separate website and a
Shopify store. It redirects users from the website to the Shopify
store and seamlessly logs them in with the same email address they
used to sign up for the original website. If no account with that
email address exists yet, one is created. There is no need to
synchronize any customer databases.
For your particular scenario, you would have to validate user credentials with your external database, generate multipass url and redirect.
Yes your requirement is quite possible. But the method i am going to mention is a hack basically. Below are the steps:
Create Login page/Account creation page in Shopify
When the user does a login/create account you send the information to your server via below methods
JSONP request
Creating a iframe of your domain and passing the information in the iframe
Now, you validate the user credentials at your server
After validating you check if the user is present in Shopify. If not you create the user with a password. API Link
Make sure you save the user password you push into Shopify at your end also.
Now when you have completed authentication of the user, return back Shopify username and password
Create a hidden form in Shopify liquid file and pass the credentials in the respective fields and submit the form and user should be able to log in with the existing password they have!

Registration process with mail confirmation in Selenium

I have question about registration process in selenium. Which way is best to do it if we must click activation link in received email? Which method is used by commercial QA teams?
I am thinking about this problem and I want to use sites like '10 minutes mail', is that a good way?
There's any other options? I can't use same mail multiple times.
Creating new 'true' mail every time will be difficult and will take too much time, there will be captcha problems etc
you can use a mailbox as registration mail, which supply API to read mail content in inbox, rather than only can from UI. Therefore you can easier to get the activation link and send http request to simulate click activation link.
Try using regular gmail account, there is a trick with '+' character and You can re-use multiple times, and mail is getting received on same account.
So You can use like this: open gmail with desired address, eg. address testmail#gmail.com, so You can reuse it in following iterations:
testmail+1#gmail.com
testmail+2#gmail.com
...
testmail+test1#gmail.com
testmail+test2#gmail.com
and so You can have...lot of accounts. I've used this method and its quite sufficient.

Mail Notification using Selenium

I have a doubt like ... Can we use mails in automation(selenium).For ex, I am submitting a form , can we use selenium
- to send email
- to verify whether email has been received by that recepient and can we process that through selenium
I have read like we should not automate with gmail as per aggreement.I am not sure about this .
It's possible. You can use Java Mail API to achieve this.
Otherwise use public email systems like Mailinator. By using the API, we can fetch email content. Please read API docs for more info.
Similar question asked before.

Record confirmation email

Using Selenium IDE(HTML), I'm recording an registering under one website, and a confirmation email will be sent when the sign up is successful.
This confirmation message will be sent to my gmail. I was recording to check in my gmail using Selenium-Ide but I can't record.So I want to know how to record in gmail using selenium?
Well where is the email going?
Gmail?
Yahoo?
Some other web page?
The above four questions is important! Because, let's say you want to check confirmation email to your gmail if so you need to go to gmail url and you need to record Login and assert things.
I will be show you a example with gmail.
I want to check in my gmail if so
command open
Target https://mail.google.com/
this one need to add to your test. Because of you need to go to new page so you need to use open command.
Have a look at PutsBox. You can send an email to whatever-you-want#putsbox.com, wait for a few seconds (SMTP stuff ins't instantaneous) then check your email via http://preview.putsbox.com/p/whatever-you-want/last.
This post tutorial shows some examples.