Searching Query in solr using Jmeter - jmeter

I configured the solr Search server in Tomcat server. I started tomcat server with below extra parameters.
Dcom.sun.management.jmxremote.port=9191
Dcom.sun.management.jmxremote.authenticate=false
Dcom.sun.management.jmxremote.ssl=false
Now I wants to test solr Searching request in my JMeter for load testing purpose. Will I be able to do it in Jmeter?

As per Solr Quick Start
Searching
Solr can be queried via REST clients, cURL, wget, Chrome POSTMAN, etc., as well as via the native clients available for many programming languages.
The Solr Admin UI includes a query builder interface - see the gettingstarted query tab at http://localhost:8983/solr/#/gettingstarted/query.
So you should be able to perform a search using HTTP Request sampler
Replace gettingstarted with your Solr core name and YOUR_QUERY_HERE with your actual query.
You will also be able to use XPath or JSON Path Extractor in order to extract some response parts into JMeter Variables if needed

Related

ElasticSeach using GeoLite2-City.mmdb

I wondered if it's possible to use /GeoLite2-City.mmdb or /GeoLite2-country.mmdb included in Elasticsearch as API. I mean, I would query it to give me IP details Instead of using an API from a different service?

Issue on Performance testing of H2 database using Jmeter JDBC requests

Facing some issue while running the performance testing of H2 database for a corda project.
JDBC requests in Jmeter is used for this testing .
some screenshots of Jmeter is given.
jdbc connection issue
jdbc reruest
result
Your question doesn't provide any error details therefore we cannot come up with the comprehensive solution, going forward make sure to include the screenshot or text of the "Sampler Result" tab of the View Results Tree listener and at least the relevant part(s) of the jmeter.log file into your question.
The most possible reason is using the wrong validation query, what you supplied is for Oracle DB, for H2 you should be using just Select 1
Also make sure to put the H2 JDBC Driver to JMeter Classpath and restart JMeter to pick up the .jar
Check out The Real Secret to Building a Database Test Plan With JMeter article for more information on the database load testing using JMeter.
P.S. Be informed that having JMeter and the application under test on the same machine is some form of a performance-testing anti-pattern as both are very resource intensive and in case of CPU/RAM/whatever lack you won't get reliable results.

Integration of elasticsearch with neo4j database

Am trying to use elasticsearch with my neo4j database for fast querying.I tried many sites but they are all old articles so i didn't get any clear idea. Steps I followed until now,
Installed neo4j
Installed elasticsearch
Copy pasted elastic search plugins into neo4j plugins folder
added this line into neo4j. properties file
elasticsearch.host_name=http://localhost:9200
elasticsearch.index_spec=people:Person(first_name,last_name), places:Place(name)
Here my question is,
How elasticsearch and neo4j are integrated. Please clarify me on this.
I followed this ,
Link
You have to install Apoc procedures plugin (https://github.com/neo4j-contrib/neo4j-apoc-procedures). The documentation about ES integration is here : ES Integration with Apoc procedures
[edit]
download and drop apoc.jar in plugins's Neo4j directory, regarding the targetted Neo4j version
restart Neo4j
in Neo4j Web browser, launch the following Cypher query to show all ES procedures:
CALL apoc.help("apoc.es")
Sample query for logs:
CALL apoc.es.getRaw("localhost","_search?q=level:ERROR",null)
YIELD value
UNWIND value.hits.hits as hits
RETURN hits LIMIT 100
The recommanded way is to store the ES host in neo4j.conf by adding a key (after restart of Neo4j):
apoc.es.myKey.url=localhost
Then the query looks like:
CALL apoc.es.getRaw("myKey","_search?q=level:ERROR",null)
YIELD value
UNWIND value.hits.hits as hits
RETURN hits LIMIT 100
For those of you who already have APOC plugin installed and accessible, but don't have access to the neo4j.properties file (or are more comfortable working with ES through curl) you can do this without using apoc.es.getRaw and can instead use the JSON returned with apoc.load.json:
WITH "http://myelasticurl:9200/my_index/_search?q=level:ERROR" as search_url
CALL apoc.load.json(search_url) YIELD value
UNWIND value.hits.hits as hit
WITH hit._source as source
...
# do work
...

Jmeter testing on multiple websites on the same server

I have a working script to login and get to one website on the webserver, what I need is how to get to the other 10 plus servers with Jmeter all at once to do a nice stress test on the websites and its interfaces.
Any help is greatly appreciated
I think that you need to use DNS Cache Manager available since JMeter 2.12
DNS Cache Manager allows each JMeter thread to resolve underlying IP address of the request endpoint on its own.
See The DNS Cache Manager: The Right Way To Test Load Balanced Apps guide for detailed explanation of background and configuration details.
This is pretty trivial using the CSV Data Set Config.
Let's assume you are using normal HTTP Request samplers and that these are already set up with a server and path. Let's say it is the server you want to change for each thread. Then you need to:
Create a text file with a different server you want to test on each line.
Add a CSV Data Config element to the top level.
Configure the CSV Data Config to use your text file and set the variable name of server.
In your samplers change the server name to ${server}.
You can use the same method to change the path and other details.

Jmeter test fail on same app different servers (Spring webflow + Primefaces)

I'm having a weird problem with JMeter.
Scenario:
Web app running on localhost
Record a simple test on Jmeter (login + 1 search)
Execute the test on localhost with Jmeter. Test runs OK.
Change the server and port on HTTP Request Defaul for another server's IP and port running the same version of the app.
The test runs but fails at the search with ".FlowExecutionRestorationFailureException: A problem occurred restoring the flow execution with key 'e3s2'"
If i do the same swapging servers (record on remote server and try to execute on local) the behavior is the same.
¿Any clues of what can it be? I don't understand why it manages to do the login and navigate on another server but fails on other action.
In short, if I record a test it fails at somepoint if I change the server.
Software_
Jmter 2.12
Primefaces 5.0
Spring Webflow 2.3.1.RELEASE
Apache Tomcat 7.0
My expectation is that there is at least one dynamic parameter which is currently being hardcoded into your script. I would suggest to do the following:
Record your login+search flow once again
Inspect 2 .jmx scripts to detect any differences (i.e. one or more parameters having different values)
Once you find those problematic parameters you'll need to look into server's response body/headers/cookies/ to see where it lives.
As soon as you know where the parameter value lives you can use one of the following PostProcessors:
Regular Expression Extractor
XPath Extractor
CSS/JQuery Extractor
The whole process is called "correlation" so you can use "JMeter correlation" as a search term if above information is not enough to resolve your problem.
The problem was some xhtml components that didn't had any specified Id so jsf would set something like id="mainForm:j_idt12". Since my test don't need to work on dynamic generated html (are simple tests) setting the ids solve the poblem.

Resources