Jmeter testcases that captcha can handle?

We are trying to create a test jmeter file that does the following:

  • Sign in
  • get some information and verify the correctness.

In cases where we encounter problems, an error arises related to writing to the system. What we planned to do is download the link and display the link for the quote and wait for the user to type the value. After that, everything will be as usual.

We could not find a plugin that can do the same? Besides writing our own plugin, is there any option here?

+8
source share
3 answers

I was able to solve it myself. The solution is as follows:

  • Create a Beanshell Sampler

In it, the following code displays "captcha" and waits for user input

filenameOrURL = new URL("${captchaimage}"); image = Toolkit.getDefaultToolkit().getImage(filenameOrURL); Icon icon = new javax.swing.ImageIcon(image); JOptionPane pane = new JOptionPane("Enter Captcha", 0, 0, null); String captcha = pane.showInputDialog(null, "Captcha", "Captcha", 0, icon, null, null); 

Then we can use the captcha variable in any way we want. Thanks to everyone who tried to help.

+5
source

Because CAPTHA is used to detect non-humans, JMeter will always fail.

You have to make a workaround in your software: either disable captcha by requesting, or print the correct captcha somewhere on the page. Of course, only for JMeter tests.

+6
source

A dirty workaround? Print the captcha value in the alt image for the tests. And then you can get the value and continue.

+3
source

Source: https://habr.com/ru/post/894426/


All Articles