Discussion:
curl syntax to send and receive REST Service API response (xml) from jenkins
panneerrselvam natarajan
2018-10-17 03:08:55 UTC
Permalink
Hi All,

I need to execute the test suite using jenkins pipeline, The test suites
which has developed using pega (REST service API). Please do let me know
syntax to get the xml based response.

Regards
Panneer
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8950b629-48b7-4441-a37f-29880fb25410%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jan Monterrubio
2018-10-17 04:28:00 UTC
Permalink
Do you know how to get the response with just curl?

If so I think you can have a step in the pipeline that’s a script curl
YOUR_OTHER_STUFF’


pipeline {

agent any

stages {

stage('Example') {

steps {

curl 'Your call here'

}

}

}

}
Post by panneerrselvam natarajan
Hi All,
I need to execute the test suite using jenkins pipeline, The test suites
which has developed using pega (REST service API). Please do let me know
syntax to get the xml based response.
Regards
Panneer
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/8950b629-48b7-4441-a37f-29880fb25410%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/8950b629-48b7-4441-a37f-29880fb25410%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BLQYuVDmKi5iFRD1gXGOnSO0F9SOE%2Brv%2BXXhm6LfRL7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
panneerrselvam natarajan
2018-10-17 05:48:17 UTC
Permalink
Hi ,

Thanks for your response.

I am expecting complete curl statement (syntax ) for request and xml
response.

Regards
Panneer


On Tuesday, October 16, 2018 at 8:08:55 PM UTC-7, panneerrselvam natarajan
Post by panneerrselvam natarajan
Hi All,
I need to execute the test suite using jenkins pipeline, The test suites
which has developed using pega (REST service API). Please do let me know
syntax to get the xml based response.
Regards
Panneer
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b1b97c80-a692-4171-b99e-c122853639a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Matt Hicks
2018-10-24 14:25:46 UTC
Permalink
Hi Panneer,

Could you please explain in more detail how you run the tests outside of
Jenkins?

Cheers,
Matt
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a46943f5-e867-434b-ab95-2f565261d25b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
panneerrselvam natarajan
2018-10-24 15:55:54 UTC
Permalink
Hi Matt,

We have Pega test suite (Rest API) and it is working fine in pega and
postman. Now through jenkins pipeline i need to call the test suite and
verify the xml response thru jenkins.


Please do let me know if you need clarification.

Regards
Panneer
Post by Matt Hicks
Hi Panneer,
Could you please explain in more detail how you run the tests outside of
Jenkins?
Cheers,
Matt
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/87d31c98-31c1-4710-90e9-ba4a873608df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Matt Hicks
2018-10-24 16:24:40 UTC
Permalink
Are you following the suggestions
at https://community.pega.com/knowledgebase/articles/running-pegaunit-test-cases-and-test-suites-execute-tests-service-pega-73#config_build
?


On Wednesday, October 24, 2018 at 11:55:54 AM UTC-4, panneerrselvam
Post by panneerrselvam natarajan
Hi Matt,
We have Pega test suite (Rest API) and it is working fine in pega and
postman. Now through jenkins pipeline i need to call the test suite and
verify the xml response thru jenkins.
Please do let me know if you need clarification.
Regards
Panneer
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/86cd5da3-9d24-4a33-b3d4-abc1c8aef9de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jan Monterrubio
2018-10-25 04:31:13 UTC
Permalink
You could also try this:
http://blog.getpostman.com/2016/02/03/curl-and-postman-work-wonderfully-together/
since you know how to call it in postman
Are you following the suggestions at
https://community.pega.com/knowledgebase/articles/running-pegaunit-test-cases-and-test-suites-execute-tests-service-pega-73#config_build
?
On Wednesday, October 24, 2018 at 11:55:54 AM UTC-4, panneerrselvam
Post by panneerrselvam natarajan
Hi Matt,
We have Pega test suite (Rest API) and it is working fine in pega and
postman. Now through jenkins pipeline i need to call the test suite and
verify the xml response thru jenkins.
Please do let me know if you need clarification.
Regards
Panneer
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/86cd5da3-9d24-4a33-b3d4-abc1c8aef9de%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/86cd5da3-9d24-4a33-b3d4-abc1c8aef9de%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9Jamv-jO6TUKF1k1bVDqMr4MP0AZyzLuCAueqvXCMJgfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
prasad venkata ramasatya Nandagiri
2018-10-29 06:46:40 UTC
Permalink
In the curl command give -o so that you get response back. You can also specify output format by using —output-format attribute.

But I prefer http request plugin to make rest calls from pipeline script. It is very easy to use.

https://jenkins.io/doc/pipeline/steps/http_request/
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e87a2b82-f400-4872-bb8a-096807126a14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
panneerrselvam natarajan
2018-10-30 01:02:30 UTC
Permalink
Hi Prasad,

Thanks for your response.

I am getting response using HTTP instead of HTTPS and stored in xml file..
How do i read the xml file?
The new XmlParser().parseText() displayed some error

Regards
Panneer
Post by panneerrselvam natarajan
Hi All,
I need to execute the test suite using jenkins pipeline, The test suites
which has developed using pega (REST service API). Please do let me know
syntax to get the xml based response.
Regards
Panneer
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e1492cbf-f53b-41a5-b854-cdd59825e1b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Martin d'Anjou
2018-10-30 16:48:36 UTC
Permalink
I wrote a proposal
<https://docs.google.com/document/d/1Xz3I02T-QxlJW-1nt_CofF2I6se3hztF9ZsHqxu55nU>
to create a plugin to wrap the jenkins-rest library
<https://github.com/cdancy/jenkins-rest> inside a jenkins plugin for Google
Summer of Code 2019 (GSoC). This would eliminate the need to parse XML
responses and deal with errors. It would make the pipeline scripts simpler.
I would need someone to co-mentor this project. If you want to know more
let me know. There are other projects
<https://docs.google.com/document/d/14N6kCShmxy4SumT0khuEFxXYZE4v1_bimK66PJuBHzM/edit?usp=sharing>
too.

Martin


On Monday, October 29, 2018 at 9:02:30 PM UTC-4, panneerrselvam natarajan
Post by panneerrselvam natarajan
Hi Prasad,
Thanks for your response.
I am getting response using HTTP instead of HTTPS and stored in xml file..
How do i read the xml file?
The new XmlParser().parseText() displayed some error
Regards
Panneer
Post by panneerrselvam natarajan
Hi All,
I need to execute the test suite using jenkins pipeline, The test suites
which has developed using pega (REST service API). Please do let me know
syntax to get the xml based response.
Regards
Panneer
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/56d13d7a-d7ee-4c44-a391-0c3bbeff3759%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...