jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1849305 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
Date Wed, 19 Dec 2018 14:45:07 GMT
Author: pmouawad
Date: Wed Dec 19 14:45:07 2018
New Revision: 1849305

URL: http://svn.apache.org/viewvc?rev=1849305&view=rev
Log:
Bug 62959 - Ability to create a Test plan from a Curl command

Improve:
- Make popup non modal
- Use KeepAlive and follow redirects
- Setup OOTB scheduler, thread, iterations
Bugzilla Id: 62959

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java?rev=1849305&r1=1849304&r2=1849305&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
Wed Dec 19 14:45:07 2018
@@ -112,7 +112,7 @@ public class ParseCurlCommandAction exte
      */
     private final void showInputDialog() {
         EscapeDialog messageDialog = new EscapeDialog(GuiPackage.getInstance().getMainFrame(),
-                JMeterUtils.getResString("curl_import"), true); //$NON-NLS-1$
+                JMeterUtils.getResString("curl_import"), false); //$NON-NLS-1$
         Container contentPane = messageDialog.getContentPane();
         contentPane.setLayout(new BorderLayout());
         statusText = new JLabel("", JLabel.CENTER);
@@ -143,12 +143,15 @@ public class ParseCurlCommandAction exte
         ThreadGroup threadGroup = new ThreadGroup();
         threadGroup.setProperty(TestElement.GUI_CLASS, ThreadGroupGui.class.getName());
         threadGroup.setProperty(TestElement.NAME, "Thread Group");
-        threadGroup.setNumThreads(1);
-        threadGroup.setRampUp(1);
+        threadGroup.setNumThreads(10);
+        threadGroup.setRampUp(10);
+        threadGroup.setScheduler(true);
+        threadGroup.setDuration(3600);
+        threadGroup.setDelay(5);
 
         LoopController loopCtrl = new LoopController();
-        loopCtrl.setLoops(1);
-        loopCtrl.setContinueForever(false);
+        loopCtrl.setLoops(-1);
+        loopCtrl.setContinueForever(true);
         threadGroup.setSamplerController(loopCtrl);
 
         TestPlan testPlan = new TestPlan();
@@ -185,6 +188,8 @@ public class ParseCurlCommandAction exte
         httpSampler.setProperty(TestElement.NAME, "HTTP Request");
         httpSampler.setProtocol(new URL(request.getUrl()).getProtocol());
         httpSampler.setPath(request.getUrl());
+        httpSampler.setUseKeepAlive(true);
+        httpSampler.setFollowRedirects(true);
         httpSampler.setMethod(request.getMethod());
         
         HashTree samplerHT = parentHT.add(httpSampler);



Mime
View raw message