Postman - Running REST API tests in Jenkins with Newman

  Рет қаралды 51,880

Valentin Despa

Valentin Despa

Күн бұрын

Пікірлер: 83
@vdespa
@vdespa 4 жыл бұрын
✅ Want to learn more about Postman? Check out my Postman online course. vdespa.com/courses/?q=KZbin
@jotunros
@jotunros 3 жыл бұрын
Fantastic video. I needed a simpIe example of creating pipeline scripts in jenkins and you delivered so much more. I completely missed the existence of the junit reporter. Thanks a lot!
@vdespa
@vdespa 3 жыл бұрын
You are welcome!
@saoussenslii7225
@saoussenslii7225 3 жыл бұрын
excellent tutorial , exactly what I was looking for, thank you
@vdespa
@vdespa 3 жыл бұрын
Great, thanks for letting me know.
@hecis1983
@hecis1983 5 жыл бұрын
Great tutorial! I found out about newman today and was thinking - it would be great if we can run our postman tests on jenkins and have reports available for the test runs instead of the current postman provided monitor runs. Then I found this video which does pretty much exactly what we need. Thanks a lot, subscribed!
@ironrose6
@ironrose6 4 жыл бұрын
Valentin, thank you SO much!! This was exactly what I needed.
@vdespa
@vdespa 4 жыл бұрын
You're so welcome! Thank you for your comment.
@rprasad1421
@rprasad1421 4 жыл бұрын
This is the best Video available on KZbin on postman. I want to add more detailed report and want to share in the email with team mates. How can I accomplish this ?
@vdespa
@vdespa 4 жыл бұрын
Here is a way to create better reports: kzbin.info/www/bejne/e5zVf3qQrbljlc0
@AndyWilliams22
@AndyWilliams22 4 жыл бұрын
Great video! Thanks for putting this together!
@vdespa
@vdespa 4 жыл бұрын
Glad you enjoyed it!
@g.nathaniel4262
@g.nathaniel4262 4 жыл бұрын
Thank you for this tutorial, I found it to be very helpful.
@vdespa
@vdespa 4 жыл бұрын
Glad it was helpful!
@ravindramanneru5001
@ravindramanneru5001 3 жыл бұрын
Valentin, Thank you so much!
@vdespa
@vdespa 3 жыл бұрын
You are welcome!
@prahladsingh4889
@prahladsingh4889 6 жыл бұрын
Thanks for this video . It is amazing and I learned Postman, Newman , GIT and Jenkins integration , Thanks a lot!
@kanwal4805
@kanwal4805 3 жыл бұрын
Thank you this video. Can you please also make a video on, how to run collection on different environments in Jenkins, usually we export the environment collection and pass in command line but how it can be parametrised on Jenkins. Thank you!
@vdespa
@vdespa 3 жыл бұрын
Noted
@madiharehman1820
@madiharehman1820 5 жыл бұрын
Hi Valentin, Thanks a lot for amazing lesson.
@TarekFaham
@TarekFaham 2 жыл бұрын
Fantastic... I love it... How we can use newman with a unit testing framework such as NUnit in C#? Basically do much the same this as per the video but to be part of NUnit tests.
@vdespa
@vdespa 2 жыл бұрын
Thanks, Tarek. Postman does not work at a unit test level as it does not have access to code.
@shwetajain8070
@shwetajain8070 6 жыл бұрын
Hi Valentin , Great video ! Its really really helpful. could you please also make a video of how to log request and response in Newman report.
@MrLink0r
@MrLink0r 6 жыл бұрын
Thanks a lot for the great job, really helpful tutorial for the newbies!!!
@ruariobrien
@ruariobrien 7 жыл бұрын
Amazing Job, great video thanks!
@travisua
@travisua 6 жыл бұрын
Great tutorial! Thanks Valentin
@hemangikadam6550
@hemangikadam6550 8 ай бұрын
Please help in solving error MessagingException message: Could not convert socket to TLS Next SSLHandshakeException message: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
@bharatkumar5277
@bharatkumar5277 6 жыл бұрын
Thanks for your videos.Your efforts in making the videos are very much appreciated.....I want to run the pipeline script using windows commands.Can you share the windows executable commands for the pipeline script.I tried by giving below script.Build is success but test didn't execute as i don't see the pass and failed results in the output.Also npm is not installed up on triggering the build.
@sunilkumarketha4699
@sunilkumarketha4699 5 жыл бұрын
I have done the same but ended with the below result. Any help is appreciated. java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\Program Files (x86)\Jenkins\workspace\SampleJob"): CreateProcess error=2, The system cannot find the file specified
@MohamedSalahAboFares
@MohamedSalahAboFares 5 жыл бұрын
Dear Valentin, I need your hapl as I always have an error "'newman' is not recognized as an internal or external command, operable program or batch file." once I'm trying to run new man I already make sure that npm and node installed successfully and new man tooas below C:\Users\test>node -v v8.11.1 C:\Users\test>npm -v 5.6.0 C:\Users\test>npm install -g newman npm WARN deprecated circular-json@0.5.5: CircularJSON is in maintenance only, flatted is its successor. C:\Users\mmorsi\AppData\Roaming pm ewman -> C:\Users\mmorsi\AppData\Roaming pm ode_modules ewman\bin ewman.js + newman@4.4.0 added 141 packages in 24.43s
@yaronnir
@yaronnir 6 жыл бұрын
great video Velentin. I have a newman command line to run my postman collection. i want to export my results into file. but i need the request/response also to be in these results. couldn't find any newman command line to do so...can you help?
@yogagappp4521
@yogagappp4521 5 жыл бұрын
Thank you, its a big help for newbie like me .. :D
@spin1613
@spin1613 5 жыл бұрын
Good Day Valentin! You are a greate conten maker! Today I'm just trying to master API testing and Your video really helpful for me. But I have some trobles and really hope that You can help me. I was doing every step by step on You video, but in the end I was confused. Sorry for much text: 1) Running in Durability level: MAX_SURVIVABILITY [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\New pipeline [Pipeline] { [Pipeline] stage [Pipeline] { (Postman tests) [Pipeline] git No credentials specified > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > C:\Program Files\Git\bin\git.exe config remote.origin.url github.com/AlexanderSQA/SWAPI.git # timeout=10 Fetching upstream changes from github.com/AlexanderSQA/SWAPI.git > C:\Program Files\Git\bin\git.exe --version # timeout=10 > C:\Program Files\Git\bin\git.exe fetch --tags --force --progress -- github.com/AlexanderSQA/SWAPI.git +refs/heads/*:refs/remotes/origin/* > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 Checking out Revision a75f8982905b62c3ec83cc4dab3e114123a242a4 (refs/remotes/origin/master) > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10 > C:\Program Files\Git\bin\git.exe checkout -f a75f8982905b62c3ec83cc4dab3e114123a242a4 > C:\Program Files\Git\bin\git.exe branch -a -v --no-abbrev # timeout=10 > C:\Program Files\Git\bin\git.exe branch -D master # timeout=10 > C:\Program Files\Git\bin\git.exe checkout -b master a75f8982905b62c3ec83cc4dab3e114123a242a4 Commit message: "Update package.json" > C:\Program Files\Git\bin\git.exe rev-list --no-walk a75f8982905b62c3ec83cc4dab3e114123a242a4 # timeout=10 2)[Pipeline] sh [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.(Proc.java:250) at hudson.Proc$LocalProc.(Proc.java:219) at hudson.Launcher$LocalLauncher.launch(Launcher.java:937) at hudson.Launcher$ProcStarter.start(Launcher.java:455) at org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:194) at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:99) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:317) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor323.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:160) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:158) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:162) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) 3)Caused: java.io.IOException: Cannot run program "nohup" (in directory "C:\Program Files (x86)\Jenkins\workspace\New pipeline"): CreateProcess error=2, Не удается найти указанный файл at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.(Proc.java:250) at hudson.Proc$LocalProc.(Proc.java:219) at hudson.Launcher$LocalLauncher.launch(Launcher.java:937) at hudson.Launcher$ProcStarter.start(Launcher.java:455) at org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:194) at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:99) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:317) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor323.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:160) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:158) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:162) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.run(WorkflowScript:4) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:84) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83) at sun.reflect.GeneratedMethodAccessor322.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:186) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:370) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:93) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:282) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:270) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:66) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Finished: FAILURE
@spin1613
@spin1613 5 жыл бұрын
@@vdespa thx for fast answer! Should I check the path to git.exe on the Configurating of Jenkins or path in my pipeline script? I checked it few times =( 1) path to git.exe directory C:\Program Files\Git\bin\git.exe 2) path to my repository github.com/AlexanderSQA/SWAPI.git 3) script in package.json "api-test": "newman run SWAPI.postman_collection.json -n 3 -d data.csv" 4) pipeline script node { stage('Postman tests') { git 'github.com/AlexanderSQA/SWAPI.git' sh 'npm install' try{ sh 'npm run api-tests' currentBuild.result ='SUCCESS' } catch (Exception ex){ currentBuild.result ='FAILURE' } } }
@paneerselvam3682
@paneerselvam3682 3 ай бұрын
Hi Sir, i understand we have schedule run in postman and we have Newman to generate report. In my project i have a requirement where I have to schedule a collection run with postman and share the run report via email. Do we have a way to schedule a collection run and share the result via email?
@vdespa
@vdespa 3 ай бұрын
@@paneerselvam3682 You might want to look into how to run Newman in a CI/CD tool like Jenkins or GitLab.
@sinjininupur
@sinjininupur 6 жыл бұрын
wowww.. amazing... Thanks a lot!!
@andreasn
@andreasn 2 жыл бұрын
@Valentin Despa why is there being a package-lock.json, i dont see it being created in your project. Do i need this or can i delete it?
@vdespa
@vdespa 2 жыл бұрын
This file locks the version of the packages installed. Don't delete it.
@andreasn
@andreasn 2 жыл бұрын
​@@vdespa Thank you very much, i have one more question. I have a declerative pipeline, and although im getting testresults, they are not displayed in a trend like yours on the dashboard. I have to click on the test run, then go into test results, and i only see a blue and red bar. In the jenkinsfile i have this: post { always { junit( allowEmptyResults: true, testResults: 'newman.xml', skipPublishingChecks: true ) } and in the package i have this: "description": "Project for postman tests", "scripts": { "api-tests": "newman run --verbose APITest.postman_collection.json -e Env.postman_environment.json --export-environment Env.postman_environment.json --delay-request 4000 --reporters cli,junit --reporter-junit-export newman.xml" } You wouldnt happen to know what could be the reason?
@coolkostian
@coolkostian 4 жыл бұрын
Thanks for the helpful video. is there any way to integrate the collection runner with Java code? ideally would be great to know how to integrate 'Newman with java code'
@vdespa
@vdespa 4 жыл бұрын
You are welcome. Can you be a bit more specific regarding the integration? Which problem are you trying to solve here?
@coolkostian
@coolkostian 4 жыл бұрын
​@@vdespa I have a Postman Collection and my team really likes newman Reports and we want to make it apart with our Java/Selenium project which is not using Jenkins. so it there a way to do this?
@vdespa
@vdespa 4 жыл бұрын
@@coolkostian not really but I don't see why you would like to do it. Postman/Newman can run independently of any project. What do you use for CI/CD?
@jenntjie6815
@jenntjie6815 4 жыл бұрын
Hi, is it possible to use nodejs plugin in Jenkins to call the Newman command in Jenkins pipeline?
@vdespa
@vdespa 4 жыл бұрын
I think it should work. You just need to make sure that newman is installed.
@sriramdassivasai4676
@sriramdassivasai4676 6 жыл бұрын
hey valentin, What i have to do for post requests..?
@crazygamesworld4427
@crazygamesworld4427 5 жыл бұрын
1. How you create docker image?? (Because start 15:00 video, i can't understend) 2. Need to intall Jenkins? and which (for Docker or windows) Thanks
@victorregoz
@victorregoz 5 жыл бұрын
@@vdespa so $: docker pull vdespa ?
@victorregoz
@victorregoz 5 жыл бұрын
@@vdespa Thanks! my collection ran smoothly in there. I will take the how to set up my own container as homework
@parveenchauhan5132
@parveenchauhan5132 4 жыл бұрын
Hi Valentin, I am facing an issue when run newman comman from jenkins. "Newman is not recognized as internal and external command." Bur its working fine when running from the command prompt. Can you please help to fix the issue?
@vdespa
@vdespa 4 жыл бұрын
It is hard to know what the problem is in this case. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
@dth2881
@dth2881 Жыл бұрын
I dont know why we need to add api test from postman to jenkins, as I try sometimes, i let the test result on postman as not pass, but when I run it in jenkins, the the result in jenkins still sucessfull it like just success for the intergation not for the API test, so what the intergation for?, could you please help here?
@vdespa
@vdespa Жыл бұрын
You need to explore why there is a difference between local and Jenkins. Essentially, you want to use Jenkins so that the tests are executed automatically without you needing to remember to run them. You need to see the bigger CI/CD picture here.
@dth2881
@dth2881 Жыл бұрын
Thank @@vdespa so much, i will check it one more time
@nagaswaraok4134
@nagaswaraok4134 4 жыл бұрын
Plese help me when i run postman collections through jenkins i got new man not recognized internal or extenal command
@vdespa
@vdespa 4 жыл бұрын
make sure newman (nodejs bin folder) in inside your PATH variable.
@KavithaGk19
@KavithaGk19 6 жыл бұрын
Great video. It really helped me understand the end to end integration flow. can you please help me here? i have 10 collections and exported each of the collection under tests folder as per your video. If i want to run only 2 collection for smoke test should i create package.json for each of the collections? or i should include all the collection json under package.json--> scripts with comma separated and in jenkins i have to write sh for each of the collection script? as below package.json "scripts": { "api-test-qa": "newman run tests/ContactInfoSuite.json -e QA_environment.json -g globals.json -d ContactInfoData.csv", "api-test-qa1":"newman run tests/ContactInfofun.json -e QA_environment.json -g globals.json -d ContactInfofun.csv" }, Jenkins sh "api-test-qa sh "api-test-qa1"
@KavithaGk19
@KavithaGk19 6 жыл бұрын
Thanks again..
@Thrissur2022
@Thrissur2022 4 жыл бұрын
Bro...from 17:50....none of the commands are visible....can u pls reply if possible
@vdespa
@vdespa 4 жыл бұрын
Is the screen blurry or what is the issue?
@rahilkumar3558
@rahilkumar3558 6 жыл бұрын
facing two issues 1. After running "npm init", two json files got generated generated "package.json" and "package-lock.json" 2. I have tried on loaclhost jenkins. getting Below Error java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.(Proc.java:249) at hudson.Proc$LocalProc.(Proc.java:218) at hudson.Launcher$LocalLauncher.launch(Launcher.java:929) Is there anything which i missed in jenkins Setting? I have just created the Build in jenkins
@Vmanoj003
@Vmanoj003 6 жыл бұрын
Hi Rahil did you find any solution for this issue. i am also facing the same issue
@spin1613
@spin1613 5 жыл бұрын
Hi there! I have same issues! Did someone find the solutions for this issues? I was break down my brain and nothing helps me.
@elmirmahmudov6215
@elmirmahmudov6215 6 жыл бұрын
Thanks a lot man )
@elmirmahmudov6215
@elmirmahmudov6215 6 жыл бұрын
Valentin Despa Thank u man for such a great tutorial! i am new in QA. U really helped me. And can u please give information or comparision of Rest api automation tools? what is the pros and cons of newman and etc. Thanks again
@elmirmahmudov6215
@elmirmahmudov6215 6 жыл бұрын
Valentin Despa actually i pretty much searched and confused ( for example : SoapUi, Rest-assured, cucumber, postman-Newman, Behat (PHP). My goal is rest api testing automation and integration with jenkins. Do you know any php framwork for that and do you recommend? and pls what is most suitible framework for my goal?
@smartworld9246
@smartworld9246 7 жыл бұрын
@Valentin Despa Can you help me fix this error ? C:\Program Files (x86)\Jenkins\workspace\postman>npm install npm WARN postman@1.0.0 No repository field. [Pipeline] bat [postman] Running batch script C:\Program Files (x86)\Jenkins\workspace\postman>npm run test > postman@1.0.0 test C:\Program Files (x86)\Jenkins\workspace\postman > newman run Address.postman_collection.json --reporters junit --reporter-junit-export newman.xml [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline groovy.lang.MissingPropertyException: No such property: Result for class: org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper Possible solutions: result at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:486) at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:341) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onSetProperty(GroovyInterceptor.java:84) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onSetProperty(SandboxInterceptor.java:165) at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:338) at org.kohsuke.groovy.sandbox.impl.Checker.checkedSetProperty(Checker.java:345) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.setProperty(SandboxInvoker.java:33) at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawSet(PropertyAccessBlock.java:24) at WorkflowScript.run(WorkflowScript:11) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.set(PropertyishBlock.java:88) at com.cloudbees.groovy.cps.impl.AssignmentBlock$ContinuationImpl.assignAndDone(AssignmentBlock.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:173) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:162) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:162) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Finished: FAILURE
@smartworld9246
@smartworld9246 7 жыл бұрын
Thanks that helped .
@papakpmartin
@papakpmartin 6 жыл бұрын
Very nice tutorial... thanks! I'm wondering, is there a way of running Postman tests in Jenkins just like this but without the NodeJS "wrapper project"?
@papakpmartin
@papakpmartin 6 жыл бұрын
Thanks... after I asked I presumed that might work and I went and tried it... joy! This tutorial really helped jump start the project for me... thanks!
@papakpmartin
@papakpmartin 6 жыл бұрын
Have you run into "ERROR: Test reports were found but none of them are new. Did leafNodes run? For example, /var/jenkins_home/workspace/Third/newman.xml is 7.1 sec old" issues? I'm running in a Docker container using a machine local directory for jenkins_home, and I see things run beautifully for a while, then they start to reliably fail like that... just a few seconds off, but all the right data is in the file.
@papakpmartin
@papakpmartin 6 жыл бұрын
Yeah, everything is running and being created as expected... I suspect some latency problem from Docker to the local file system
@amruthapenigalapati5593
@amruthapenigalapati5593 4 жыл бұрын
Hi sir, The explanation was good but the video is not that clear.
@dinhhuyvt
@dinhhuyvt 7 жыл бұрын
[Jenkins_Newman_Test] Running shell script + npm install /var/lib/jenkins/workspace/Jenkins_Newman_Test@tmp/durable-f7e2cac0/script.sh: line 2: npm: command not found [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 127 Finished: FAILURE Anyone help on this issue?
@dinhhuyvt
@dinhhuyvt 7 жыл бұрын
@Valentin Despa: I have installed node and npm on my Server CentOS, and able to run npm on CentOS by command line. But when I tried to build on Jenkin on this server, it' generated message as I mentioned :(
@smartworld9246
@smartworld9246 7 жыл бұрын
The previous error was fixed but am getting some scrambled symbols where ever it has to use tables. Can you please help me figure out what needs to be fixed? The console looks something like below > newman run Address.postman_collection.json --reporters cli,junit --reporter-junit-export newman.xml newman Address → [GET] My Address GET api.lob.com/v1/addresses [200 OK, 6.71KB, 8.3s] √ Status code is 200 → [POST] Create Address POST api.lob.com/v1/addresses [200 OK, 904B, 873ms] √ Status code is 200 → [GET] Retrieve Single Address by Id GET maps.googleapis.com/maps/api/place/textsearch/json?query=restaurent in Mumbai&key=AIzaSyCqQFAe9kxuG7knYJc49RnJsA8cjpudYMM [200 OK, 10.71KB, 2s] √ Status code is 200 → [DELETE] Delete Single Address by Id DELETE api.lob.com/v1/addresses/adr_f58af078a66c53ce [200 OK, 291B, 269ms] √ Status code is 200 ┌─────────────────────────┬──────────┬──────────� │ │ executed │ failed │ ├─────────────────────────┼──────────┼──────────┤ │ iterations │ 1 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ requests │ 4 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ test-scripts │ 4 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ prerequest-scripts │ 0 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ assertions │ 4 │ 0 │ ├─────────────────────────┴──────────┴──────────┤ │ total run duration: 12s │ ├───────────────────────────────────────────────┤ │ total data received: 17.39KB (approx) │ ├───────────────────────────────────────────────┤ │ average response time: 2.9s │ └───────────────────────────────────────────────┘ [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS
@great-stuff-6688
@great-stuff-6688 7 жыл бұрын
Hi Valentin, the video is amazing. I have a question: how to get /systeminfo endpoint? Thanks.
@great-stuff-6688
@great-stuff-6688 7 жыл бұрын
Thank you for the response, how to start Jenkins process with an additional parameter -Dfile.encoding=UTF-8? Could you please post the syntax statement for me?
Run Postman Collections in Jenkins with Newman
35:35
Valentin Despa
Рет қаралды 21 М.
Data-driven testing using Postman
13:37
Valentin Despa
Рет қаралды 59 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 34 МЛН
Человек паук уже не тот
00:32
Miracle
Рет қаралды 4,1 МЛН
When u fight over the armrest
00:41
Adam W
Рет қаралды 26 МЛН
How to run Postman API Tests with Newman in Gitlab CI
13:23
Valentin Despa
Рет қаралды 38 М.
Advanced workflows (request chaining) with Postman
11:29
Valentin Despa
Рет қаралды 15 М.
The Basics of Using Postman for API Testing
10:00
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 666 М.
API Testing using POSTMAN - Advance Test Cases
10:17
ItsTechMode
Рет қаралды 62 М.
API testing using postman - Part 2(Running in jenkins)
16:29
ItsTechMode
Рет қаралды 23 М.
Postman Newman Tutorial - How to automate the test runs (PART 2)
16:47
JSON Schema validation in Postman
9:29
Valentin Despa
Рет қаралды 48 М.
Loop request based on data from response in Postman
13:13
Valentin Despa
Рет қаралды 61 М.
Postman Newman Tutorial - How to automate the test runs
13:29
Valentin Despa
Рет қаралды 33 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 34 МЛН