click on a button using jmeter - jmeter

I am testing a site using JMeter. For form submission I am using HTTP Request Sampler of JMeter.Its working fine. But I wanted to know that, is it possible to click submit buttons of html forms and receive responses using JMeter(exactly what we can do using browsers)?

No, You can not simulate events like button click using JMeter. JMEter can record web HTTP request-response and simulate it for a number of times.
You can use Selenium IDE to record and test user interactions on your web page.

Related

How Record WEB Application and test load/Performance in JMeter

I tried to test one WEB application. I log in to the application and then go to diff. menu. In JMeter, I used "HTTP(S) Test Script Recorder" to record the application after stopping the recording many requests are created and I tried to run those requests then some requests failed it shows error 403, "Invalid username and password ". Here I also used a recording controller.
So I need help to test the load /performance of my web application for multiple users so how is it achieved?
I don't think that "many" requests should be created, I can think of 3:
Open login page
Perform login
Go to "diff" menu
If you're seeing "many" requests most probably you're recording a lot of stuff that you should not be recording like embedded resources
There is Recording Template which is kind of handy, it has pre-defined patterns for excluding of common file types which you should not be recording
Also be aware that in the majority of cases you won't be able to successfully replay a set of recorded requests without correlating the dynamic parameters.

Web API load testing

When I record script, my login page recorded as html. but other pages not recorded as html pages rather it shows as js and web APIs. I cannot able to record or create script using html url. Kindly anyone help what exactly the solution. I can able to load test only web API or any way to create script using html urls.
It depends on your application nature. The whole idea of web applications load testing is simulating real users which are using real browsers as close as possible so ideally your load test should exactly mimic the HTTP Requests originating from browser when user is doing actions according to application use case(s).
You should not be recording .js files as well as .css files, all images and other media (audio, video, flash, whatever), instead of this you need to configure JMeter to download embedded resources instead of recording and replaying the relevant requests.
If you need to load test the API itself you can omit simulating browser and send requests directly to API endpoints, check out Building a WebService Test Plan JMeter User Manual chapter for more details.

How to automate CA mainframe screen validations using selenium?

We have an API where, if i enroll some data it will reflect in mainframe system, i need to validate few details using selenium testNG framework..Could anyone help me on this?
Selenium is a Web Browser UI validation framework. If you are trying to validate api, then selenium is not going to be the right tool for you. You could look into SOAP UI or you could build your own custom api validation framework that hits an api endpoint, serializes it to an object and then validates the response values based on what you expect the response to be. I've also built hybrid frameworks where, I manipulate the browser via selenium and then at one point in the test I have to call an api to validate that another application was updated. But you wouldn't use anything from the selenium libraries for api validation.
Selenium is used to test GUI. If you want to implement API testing, you can use RestAssured framework if you like to code or SoapUI.

How to Launch two session(App and Mobile Browser) in single appium server?

Hi I have this iOS native app functionality that needs to automate in Appium-Ruby + Cucumber.
After completing the registration flow(Signup), i need to put the app in background and open safari mobile web browser,then Go to Mailinator.com and activate my account.
Could anyone help me in how to handle this?
I am new to Appium-Ruby+Cucumber.
I am using Appium 1.6 version
There are multiple alternative solutions to this rather than getting into the complications of opening the browser activity and leaving the app context in your test case..
1) Would be to integrate webdriver for browser within your appium test suite, maybe use phantomjs so the browser is headless.
Eg:
def activate_my_account
browser = Selenium::WebDriver.for(:phantomjs)
browser.get("http:://mailinator.com")
<perform your action here>
end
2) Use a api driven mail client to get the latest email using api matching the subject line. Strip out the url from the email body and use hit the url. There is no browser involvement in this solution.
3) Get the token from database and create the validation url on the fly and hit the url using curl or http or rest client in ruby. Again this is no browser involvement solution.
Let me know in the comments if you face any issues!!
Hope it helps!!

Performance tool for Web Single Page Application

Please, assist me on this one.
Project is for Web Single Page Application that does not provide different urls for different view. Everything loads by clicking within one screen. I was asked to find performance tool to test such application.
I will not be able to get HP Loadrunner or any such tool that is in the same price range. Maybe there is an open source or how to use JIRA for my project?
Thanks
When you click somewhere, even if screen doesn't change, browser sends relevant HTTP Request (usually GET or POST). JMeter acts on protocol level, it doesn't actually "render" the page or execute JavaScript but it can send any HTTP Request.
So you should be able to record all the requests using JMeter's HTTP(S) Test Script Recorder and replay them with larger number of threads according to your load test scenario.
You can use View Results Tree listener to visualize request and response details and JMeter Assertions to ensure that test actually does what it should do.

Resources