Taurus Proxy Issue

279 views
Skip to first unread message

Shantanu Sen

unread,
Sep 4, 2019, 5:11:03 AM9/4/19
to codename-taurus
Hello 
I am using Taurus for first time. I am configuring the same on windows. I have installed Taurus and trying to convert Selenium to Jmeter Script. I am following the below reference 


I have set up proxy in blazemeter and put the same in .bzt.rc file and also placed the secret ID and token.

Please help me with the below errors 

D:\Tools\taurus-master\examples\selenium>bzt convert_to_jmx.yml
14:20:01 INFO: Taurus CLI Tool v1.13.8
14:20:01 INFO: Starting with configs: ['convert_to_jmx.yml']
14:20:01 INFO: Configuring...
14:20:01 INFO: Using proxy 'http://xxxxxxxxx:80'
14:20:01 INFO: Artifacts dir: C:\Users\1xxxxxx\bzt-artifacts\2019-09-04_14-20-01.359292
14:20:01 WARNING: at path 'execution': 'execution' should be a list
14:20:01 INFO: Preparing...
14:20:03 INFO: Proxy already exists
14:20:03 INFO: Proxy has auth, unable to use it
14:20:03 ERROR: Generic Taurus Error: Proxy has auth, unable to use it
14:20:03 INFO: Post-processing...
14:20:03 INFO: Will not pick converted JMX due to exception: Proxy has auth, unable to use it
14:20:03 INFO: Artifacts dir: C:\Users\xxxxxxxx\bzt-artifacts\2019-09-04_14-20-01.359292
14:20:03 WARNING: Done performing with code: 1

grey....@gmail.com

unread,
Sep 4, 2019, 6:08:42 AM9/4/19
to codename-taurus
Hi. please provide your yaml and selenium scripts. (without token, of course)

---
Taras

Shantanu Sen

unread,
Sep 4, 2019, 11:59:26 AM9/4/19
to codename-taurus
bzt.rc

# General Settings

settings:
  default-executor: jmeter  # if you prefer using other executor by default - change this option
  artifacts-dir: ~/bzt-artifacts/%Y-%m-%d_%H-%M-%S.%f  # change the default place to store artifact files
  check-updates: true  # check for newer version of Taurus on startup
  check-interval: 1s  # interval for Taurus engine to check test status and do other actions
  proxy:  # custom proxy settings
    address: http://:80  # proxy server address
    username: BuM  # username and password used if authentication is configured on proxy server
    password: 5Sx

---

# CLI aliases - configure your "shortcuts" to apply config pieces

#cli-aliases:  # user-defined config pieces to apply from command-line
#  debug:  # this alias is called as '-debug' from command line
#    settings:
#      verbose: true
#    modules:
#      jmeter:
#        gui: true
#      console:
#         disable: true

---

# BlazeMeter reporting settings

modules:
  blazemeter:
    token:   # API id and API secret joined with ':'
#
#    test: Test Name  # name for test to store reports
#    project: Project Name  # name for project to store test, can be numeric project ID
#    public-report: false  # set to true to create a public link to the report
#
#    browser-open: start  # auto-open the report in browser,
#                         # can be "start", "end", "both", "none"
#    send-interval: 30s   # send data each n-th second
#    timeout: 5s  # connect and request timeout for BlazeMeter API
#    artifact-upload-size-limit: 10  # limit max size of file (in megabytes)
#                                   # that goes into zip for artifact upload, 10 by default
#    check-interval: 5s  # interval which Taurus uses to query test status from BlazeMeter

---

# JMeter settings

#modules:
#  jmeter:
#    properties:  # JMeter properties for every JMeter run
#      prop_name: prop value
#    system-properties:  # Java system properties
#      sun.net.http.allowRestrictedHeaders: "true"
#    memory-xmx: 4G  # allow JMeter to use up to 4G of memory
#    path: ~/.bzt/jmeter-taurus/{version}/bin/jmeter  # path to local jmeter installation
#    version: 3.2  # version to use
#    plugins:  # plugins to install
#    - jpgc-json=2.2
#    - jmeter-ftp
#    - jpgc-casutg

---

# Gatling settings

#modules:
#  gatling:
#    properties:
#      gatling.data.file.bufferSize: 256 # output buffer size, 256 bytes by default

============================================================================================================
Yaml

---
execution:
  executor: selenium
  iterations: 1
  scenario:
    script: dir

services:
- proxy2jmx

====================================================================================================
Sel Script

package dir;

import java.util.concurrent.TimeUnit;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class selenium1 {
    private static FirefoxDriver driver;
    WebElement element;

    @BeforeClass
    public static void openBrowser() {
        driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
    }

    @Test
    public void valid_UserCredential() {

        System.out.println("Starting test " + new Object() {
        }.getClass().getEnclosingMethod().getName());
        driver.get("http://www.store.demoqa.com");
        driver.findElement(By.xpath(".//*[@id='account']/a")).click();
        driver.findElement(By.id("log")).sendKeys("testuser_3");
        driver.findElement(By.id("pwd")).sendKeys("Test@123");
        driver.findElement(By.id("login")).click();
        try {
            element = driver.findElement(By.xpath(".//*[@id='account_logout']/a"));
        } catch (Exception e) {
        }
        Assert.assertNotNull(element);
        System.out.println("Ending test " + new Object() {
        }.getClass().getEnclosingMethod().getName());
    }

    @Test
    public void inValid_UserCredential() {
        System.out.println("Starting test " + new Object() {
        }.getClass().getEnclosingMethod().getName());
        driver.get("http://www.store.demoqa.com");
        driver.findElement(By.xpath(".//*[@id='account']/a")).click();
        driver.findElement(By.id("log")).sendKeys("testuser");
        driver.findElement(By.id("pwd")).sendKeys("Test@123");
        driver.findElement(By.id("login")).click();
        try {
            element = driver.findElement(By.xpath(".//*[@id='account_logout']/a"));
        } catch (Exception e) {
        }
        Assert.assertNotNull(element);
        System.out.println("Ending test " + new Object() {
        }.getClass().getEnclosingMethod().getName());
    }

    @AfterClass
    public static void closeBrowser() {
        driver.quit();
    }
}

Shantanu Sen

unread,
Sep 5, 2019, 12:57:34 AM9/5/19
to codename-taurus
Taras, 
Anything you found?

grey....@gmail.com

unread,
Sep 5, 2019, 7:54:16 AM9/5/19
to codename-taurus
oh I see. 
1. you use your proxy (see bzt-rc) but it doesn't work with bza. If you need help with it, please use the simplest yaml and start new thread.
2. You use Firefox webdriver, it's unsupported (by proxy2jmx) case on windows (according to this)

---
Taras

Shantanu Sen

unread,
Sep 6, 2019, 3:29:14 AM9/6/19
to codename-taurus
I did the changes and now I am getting the below error 

12:58:34 ERROR: Network Error: API call error https://a.blazemeter.com/api/latest/proxy: {'code': 401, 'message': 'Unauthorized'}


Please help

Shantanu Sen

unread,
Sep 6, 2019, 8:51:38 AM9/6/19
to codename-taurus
I have moved forward to new error 

[2019-09-06 18:15:28,597 WARNING Engine.proxy2jmx] There aren't requests recorded by proxy2jmx, check your proxy configuration
[2019-09-06 18:15:28,601 WARNING Engine.proxy2jmx] Problems with chrome tuning are encountered, take look at http://gettaurus.org/docs/Proxy2JMX/ for help

Please help

Shantanu Sen

unread,
Sep 7, 2019, 7:08:27 AM9/7/19
to codename-taurus
Any pointer to the issues?

grey....@gmail.com

unread,
Sep 9, 2019, 4:02:56 AM9/9/19
to codename-taurus
Please be patient, we work on that.

---
Taras

Shantanu Sen

unread,
Sep 9, 2019, 7:19:33 AM9/9/19
to codename-taurus
Thanks a lot.

Shantanu Sen

unread,
Sep 16, 2019, 6:28:32 AM9/16/19
to codename-taurus
Any update? Sorry I am waiting for this resolution to complete an POC.

grey....@gmail.com

unread,
Sep 18, 2019, 3:30:57 AM9/18/19
to codename-taurus
I'm totally clueless what is POC. You can try to speed up that by connecting to BM support.

---
Taras

Shantanu Sen

unread,
Sep 18, 2019, 7:46:30 AM9/18/19
to codename-taurus
Sorry to confuse here, i am doing an proff of concept or research implementation to convert Selenium script to JMX, and thus I am relying on Taurus and the issue to resolve.
Message has been deleted

Tatiane Almeida

unread,
Mar 17, 2022, 3:36:24 PM3/17/22
to codename-taurus
Please, do we have any fix to this?  I'm trying to convert a Selenium script to JMeter using Taurus and I'm facing the same issue.


16:23:14 INFO: Downloading simple JMX...
16:23:18 INFO: Simple JMX saved into C:\Taurus Lab Resources\2022-03-17_16-22-35.557854\generated_sel.simple.jmx
16:23:18 INFO: Waiting for proxy to generate SmartJMX...
16:23:21 INFO: Smart JMX saved into C:\Taurus Lab Resources\2022-03-17_16-22-35.557854\generated_sel.smart.jmx
16:23:21 WARNING: There aren't requests recorded by proxy2jmx, check your proxy configuration
16:23:21 WARNING: Problems with chrome tuning are encountered, take look at http://gettaurus.org/docs/Proxy2JMX/ for help
16:23:21 INFO: Artifacts dir: C:\Taurus Lab Resources\2022-03-17_16-22-35.557854
16:23:21 INFO: Done performing with code: 0

Alla

unread,
Mar 23, 2022, 8:16:00 AM3/23/22
to codename-taurus
Hello,

Please read the docs here, it might help: https://gettaurus.org/docs/Proxy2JMX/
If you have any further questions, please send your configuration. Also, please create a separate topic for that.

BR,
Alla

Tatiane Almeida

unread,
Mar 25, 2022, 9:59:07 AM3/25/22
to codename-taurus

Check my logs:

$ bzt convert_selenium_tojmeter.yml
09:51:46 INFO: Taurus CLI Tool v1.16.3
09:51:46 INFO: Starting with configs: ['C:\\Users\\tati_\\.bzt-rc', 'convert_selenium_tojmeter.yml']
09:51:46 INFO: Configuring...
09:51:46 INFO: Artifacts dir: C:\Users\tati_\bzt-artifacts\2022-03-25_09-51-46.780418
09:51:46 INFO: Preparing...
09:51:48 INFO: Creating new recording proxy...
09:51:53 INFO: Clear proxy...
09:51:56 INFO: Latest stable version of chromedriver is 99.0.4844.51
09:51:56 INFO: Used version of chromedriver is 99.0.4844.51
09:51:56 INFO: Latest stable version of geckodriver is 0.30.0
09:51:56 INFO: Used version of geckodriver is 0.30.0
09:52:00 INFO: Installing TclLibrary...
09:52:01 INFO: Compiling .java files completed
09:52:02 INFO: Making .jar file completed
09:52:02 INFO: Starting...
09:52:02 INFO: Starting BlazeMeter recorder...
09:52:02 INFO: Prepare chrome loader
09:52:04 INFO: Waiting for results...
09:52:16 WARNING: Please wait for graceful shutdown...
09:52:16 INFO: Shutting down...
09:52:17 INFO: Stopping BlazeMeter recorder...
09:52:19 INFO: Post-processing...
09:52:19 INFO: Test duration: 0:00:13
09:52:19 INFO: Samples count: 1, 0.00% failures
09:52:19 INFO: Average times: total 7.777, latency 0.000, connect 0.000
09:52:19 INFO: Percentiles:
+---------------+---------------+
| Percentile, % | Resp. Time, s |
+---------------+---------------+
| 0.0 | 7.776 |
| 50.0 | 7.776 |
| 90.0 | 7.776 |
| 95.0 | 7.776 |
| 99.0 | 7.776 |
| 99.9 | 7.776 |
| 100.0 | 7.776 |
+---------------+---------------+
09:52:19 INFO: Request label stats:
+------------+--------+---------+--------+-------+
| label | status | succ | avg_rt | error |
+------------+--------+---------+--------+-------+
| buscaCurso | OK | 100.00% | 7.777 | |
+------------+--------+---------+--------+-------+
09:52:19 INFO: Downloading simple JMX...
09:52:23 INFO: Simple JMX saved into C:\Users\tati_\bzt-artifacts\2022-03-25_09-51-46.780418\generated_sel.simple.jmx
09:52:23 INFO: Waiting for proxy to generate SmartJMX...
09:52:27 INFO: Smart JMX saved into C:\Users\tati_\bzt-artifacts\2022-03-25_09-51-46.780418\generated_sel.smart.jmx
09:52:27 WARNING: There aren't requests recorded by proxy2jmx, check your proxy configuration
09:52:27 WARNING: Problems with chrome tuning are encountered, take look at http

I'm attaching my files to your analyses as well, the .bzt-rc file and I replaced the information on token to your analyses. My target is available externally.

In the jmx file I'm expecting just one request be recorded.

bzt.log
generated_sel.smart.jmx
generated_sel.simple.jmx
BuscaSeleniumPuro.java
.bzt-rc
convert_selenium_tojmeter.yml

Alla

unread,
Apr 7, 2022, 6:24:14 AM4/7/22
to codename-taurus
Hello,

I am afraid I can't help you with that. Proxy2jmx wasn't updated for quite some time, and it is not going to be updated soon. I suggest you contact Blazemeter support, because Taurus uses Blazemeter Recorder for the converter.

BR,
Alla
Reply all
Reply to author
Forward
0 new messages