[GitHub] jmeter pull request #436: Bug 62959 - Ability to create a Test plan from a c...

2018-12-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/jmeter/pull/436


---


[GitHub] jmeter pull request #436: Bug 62959 - Ability to create a Test plan from a c...

2018-11-27 Thread pmouawad
GitHub user pmouawad opened a pull request:

https://github.com/apache/jmeter/pull/436

Bug 62959 - Ability to create a Test plan from a cURL command

POC contributed by https://ubikloadpack.com

## Description
This is a POC for Bug 62959 - Ability to create a Test plan from a Curl 
command

## Motivation and Context

See:

- https://bz.apache.org/bugzilla/show_bug.cgi?id=62959

## How Has This Been Tested?

Unit test included  + Manual testing.

Still it's not intended to be merged unless marked as alpha

## Screenshots (if appropriate):

Copy to clipboard this or use any URL in FF or Chrome and in network panel 
select export to cURL :

`
curl 'http://jmeter.apache.org/' -H 'Proxy-Connection: keep-alive' -H 
'Proxy-Authorization: Basic X/' -H 'Upgrade-Insecure-Requests: 1' -H 
'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Mobile 
Safari/537.36' -H 'Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
 -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: 
en-US,en;q=0.9,fr;q=0.8' --compressed

`
Then select Help > Import from cURL:

https://user-images.githubusercontent.com/3127467/49117269-6e0f8480-f2a0-11e8-923a-9a3da56da3f8.png";>

A Test plan for HTTP is created:

https://user-images.githubusercontent.com/3127467/49117312-867f9f00-f2a0-11e8-9acb-8f80ff460225.png";>

Note that this is a POC, possible changes:

- Propose an text area where use can paste cURL command and then import
- If Test plan is empty a new one is created
- Otherwise, if it contains a Thread Group,  the HTTP Request will be 
created under the selected element if Controller or Thread Group

## Types of changes

- New feature (non-breaking change which adds functionality)

## Checklist:


- [x ] My code follows the [code style][style-guide] of this project.
- [ ] I have updated the documentation accordingly => Will do in future

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ubikloadpack/jmeter BUG-62959

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/436.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #436


commit e2a2fd8c625b789908e3bcf12c1c753753326375
Author: pmouawad 
Date:   2018-11-27T22:53:52Z

Bug 62959 - Ability to create a Test plan from a cURL command

POC contributed by https://ubikloadpack.com




---