Excluding Selenium-server URL in JMeter Proxy Server - selenium

I'm currently trying to get JMeter to record the steps my selenium tests so I can perform load testing with the same tests. The steps are recorded fine but my problem is that its also recording the steps performed in the "selenium-server" window (i.e. the extra windows that pop up when selenium runs).
I believe if I add something like *selenium-server* to the "URL Patterns to Exclude" List then it will ignore all these steps but they keep recording for every pattern I've tried.
Can someone please tell me the pattern which will lead to these steps getting ignore?
An example url is: /selenium-server/driver/?retry=true.
Thanks.

Try adding the following to 'URL Patterns to Exclude'
^/selenium-server/.*

If you're trying to use your Selenium tests to generate load, you might also want to look at BrowserMob. It's a company I started that runs actual Selenium browsers en masse in the cloud.

You could try to add the following to 'URL Patterns to Exclude'
.*/selenium-server/.*

Related

Login screen recording in JMeter repeating url issue

I need your help, I have recorded a login script in blaze meter and importing it into JMeter what I noticed that browsing URL is repeating like site.com/0, site.com/1,site.com/2 and so on. Please suggest what to do to fix it asap help required. thanks.
I am trying to record a login script in blaze meter when I imported the script in JMeter I found that the browsing URL is repeating. like example.com/0, example.com/1,and so on. please help me.
We cannot "help" without knowing what are your expectations.
When it comes to performance testing of web applications you need to ensure that JMeter is properly configured to behave exactly like a real browser.
It means that JMeter should send the same requests and in the same manner as the real browser does.
In case if the network footprint generated by JMeter matches the one which the real browser produces - you don't need any "help" there. If it doesn't - we need to see:
the dump of requests from "Network" tab of your browser's developer tools
how did you configure the BlazeMeter Chrome Extension, i.e. choosing "Only top level requests" might "help" you
Normally these numeric postfixes are used as the naming convention for the Transaction Controller to all nested redirects, embedded resources and so on would be considered an integral part of the parent "transaction"

How can I trigger a click from the console with Cypress?

I'm trying to run commands on cypress from the command line. For instance, selecting an element and clicking on it.
I'm trying to do this to try some tests without having to need to run all the previous steps at this point. I'm not sure if this is possible due to the sequential nature of cypress, but it would be really helpful if there was some way to do it. I assumed something like this would be possible from the developer tools console:
cy.get('[data-test="save button"]').click()
I'm aware this doesn't work, so I tried with now and then and some other weird strategies. Reading the documentation didn't help. At least the part I read. Any details are appreciated.
--- edit ---
The console is on the same chrome instance that contains the selector playground like shown in in the image below.

Using Selenium IDE for a test-case which includes backend call?

I add a new category in the admin panel and want to ensure that the category is available in the dropdown on the user's part of the website. Recorded test in the Selenium IDE works fine. But the thing is, the task that I execute is of course not a pure frontend thing - the category is saved in the database and is loaded from it to show it to the user. So if something goes wrong on the database-side, the test will fail.
My question is: is it bad practice to do such tests that depend on backend-behavior ? Should I go for Selenium Webdriver ?
If you use Selenium Webdriver, your test will not change in a main thing. It still will check database side. Selenium Webdriver is just anouther tool for testing that is more flexible and allows to make more complex test then in Selenium IDE.
I don't think that it is bad practice, because it is just one of the tests that chould be executed to enshure you that this part of your project works correctly. In this case I would check back-end part(get all categories from DB or admin's panel and check that there is no extra or missing ones) and than check user's panel(all categories are the same as set in DB and admin's panel).

how to take a screenshot of the entire webpage?

I am very new to all the technologies so can any one suggest what tool can I use to take screenshot of entire web page along with the URL.
These screenshots would be taken every quarterly, and after a quarter it will be compared with the last quarter's screenshot. It will be compared on the basis of major changes made on web page
I have to do this for 100's of domains.
Please suggest
1.Tool to take screen shot
2.How to compare.
Any suggestion appreciated.
Selenium & imacro can help u taking the browser screenshot
There is no such tool in existence which can perform above specified tasks.
You can easily find tools for capturing screenshots, but you will be not able to view changes done after a specified time. You need to develop a crawler to perform this task. You can pick PHP or .net as technology to handle this task.
In case, you have any query, you can let us know anytime.
Thank You
You can use below selenium code
File file = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
Where driver is Webdriver object (e.g. WebDriver driver=new FirefoxDriver();)
Here is an example of iMacros solution.
http://wiki.imacros.net/SCREENSHOT
URL GOTO=http://www.iopus.com/imacros/home/v9/home.asp
SCREENSHOT TYPE=Page FOLDER=* FILE=*
SCREENSHOT TYPE=Browser FOLDER=* FILE=*
You can take screenshot using selenium web driver code , See below :
http://www.ontestautomation.com/how-to-create-screenshots-in-your-selenium-webdriver-tests/

Automated way of converting Selenium HTML tests to JUnit?

I'm using Selenium IDE 1.0.10 for Firefox on Mac 10.6.6. Our QA department has created some HTML tests for Selenium that I need to convert to Junit. In the IDE, I can do that by going to the File menu and choosing export. What is an automated/scriptable way to do this same task?
Thanks, - Dave
Try this add in. I have not used it, but it is described just as you need it. Addin
Try this addon which converts Selenium HTML scripts to Java .
Selenium4J
Look at the selenese4J-maven-plugin. Similar to selenium4j (https://github.com/RaphC/selenese4j-maven-plugin).
Provides many features :
Selenium 1/2 (WebDriver) conversion
Test Suite generation
Internationalisation of your html file
Possibility to use snippet into your html file for specific test (e.g : computing working day, write custom generation of values, handle dynamic values ...)
Use of tokenized properties
I took the selenium4j project and turned it into a maven plugin for those who want to take the html test cases and automatically have them run with your maven test phase. You can also separate the tests out using a profile override with surefire.
Readme is here: https://github.com/willwarren/selenium-maven-plugin
The short version of the readme:
Converts this folder structure:
./src/test/selenium
|-signin
|-TestLoginGoodPasswordSmoke.html
|-TestLoginBadPasswordSmoke.html
|-selenium4j.properties
Into
./src/test/java
|-signin
|-firefox
|-TestLoginGoodPasswordSmoke.java
|-TestLoginBadPasswordSmoke.java
This is only tested on windows with Firefox and Chrome.
I couldn't get the IE version to pass a test, but I'm new to selenium so hopefully, if you're a selenium guru, you can get past this.