Session 10: API Testing | Postman | e-Commerce API's | How to Run Collections | Git Github & Jenkins

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2022
  • #postman #apitesting #ecommerceapis#jenkins#git
    Topics:
    1) Testing API's for e-Commerce app
    2) How many ways we can run collections & Sharing collections
    3) Git , Github & Jenkins
    @1:18 Running XAMPP server
    @2:25 Opening e-Commerce API'
    @3:04 Creating API user
    @05:06 Generating API key of API user
    @06:30 API documentation
    @24:56 Create collection in POSTMAN
    @28:03 Create collection variables in POSTMAN
    @33:23 Create token using POST request with variables and API key
    @35:32 (pm library) Validate status code and JSON response
    @39:04 (pm library) Create collection variable for API key from JSON response to use as authorization for next requests
    @43:20 Add product to cart using POST request with variables
    @44:11 Refer collection variable to use as authorization
    @46:19 (pm library) Create Product ID & quantity using collection variable in pre request script
    @51:43 (pm library) Validate status code and JSON response
    @55:12 Create GET request with product ID as input
    @58:12 (pm library) Validate status code and JSON response
    @58:28 (pm library) Create enviroment variable for cart ID from JSON response for next requests
    @01:02:57 create POST request using enviroment variable for cart ID to update quantity
    @01:05:57 (pm library) Validate status code and JSON response
    @01:07:38 create POST request using enviroment variable for cart ID
    @01:08:21 (pm library) Validate status code, validate JSON response and delete all variables
    @01:12:28 Run as collection
    @01:17:28 Install nodejs
    @01:19:07 Install newman
    @01:21:07 Export collection & run in command prompt
    @01:25:13 General HTML report
    @01:31:13 Run collection remotely using url
    @01:35:12 Start JENKINS
    @01:38:20 Run collection in JENKINS
    @01:43:50 General HTML report in JENKINS
    @01:46:34 Create empty repository in GITHUB
    @01:47:43 Push collection into remote repository
    @01:55:33 Run GITHUB collection in JENKINS
    Udemy Courses:
    Manual Testing+Agile with Jira Tool
    *****
    ► shorturl.at/xNXZ4
    Selenium with Java+Cucumber
    *****
    ► shorturl.at/aIKMW
    Selenium with Python & PyTest
    ******
    ► shorturl.at/ELW09
    Selenium with python using Robot framework
    ******
    ► shorturl.at/bcDPZ
    API Testing(Postman, RestAssured & SoapUI)
    *******
    ► shorturl.at/uAWY7
    Web & API Automation using Cypress with Javascript
    ********
    ► rb.gy/4uum2n
    Playwright with Javascript
    *********
    ► shorturl.at/gALZ1
    Jmeter-Performance Testing
    ********
    ► rb.gy/ocj7r2
    SDET Essencials(Full Stack QA)
    ********
    ► rb.gy/hlnf2v
    Appium-Mobile Automation Testing
    ***********
    ► rb.gy/wmzv64
    Java Collections
    *******
    ► bit.ly/3S66ezE
    Python Programming
    ******
    ► urlis.net/gdsfpb0s
    Cucumber BDD Framework
    *****
    ► bit.ly/3F7d69r
    Protractor with Javascript
    ******
    ► urlis.net/4uddm1qb
    TH-cam Playlists:
    Manual Testing & Agile
    *****
    ► bit.ly/3ujvaYa
    ► bit.ly/3OYzxQj
    SQL
    ****
    ► bit.ly/3R6XjeG
    ► bit.ly/3nE0a1s
    ► bit.ly/3IeKuuJ
    linux & Shell Scripting
    *****
    ► bit.ly/3up1Z6a
    ► bit.ly/3nzvGxx
    Java
    *****
    ► bit.ly/3R9QfOs
    ► bit.ly/3AoRMKM
    ► bit.ly/3IbTTDn
    ► bit.ly/3ybXInv
    ► bit.ly/3yCoHdw
    Selenium With Java+Cucumber
    ********
    ► bit.ly/3P2FMm4
    ► bit.ly/3yhiIt4
    ► bit.ly/3uokzet
    ► bit.ly/3a7XIND
    ► bit.ly/3umN2S9
    ► bit.ly/3aar7GW
    ► bit.ly/3y9kD2S
    ► bit.ly/3uhLskn
    Python
    *******
    ► bit.ly/3agNgU0
    ► bit.ly/3NJNnoy
    ► bit.ly/2CTQ4mR
    ► bit.ly/3OIYWh1
    Selenium With Python,Pytest&Behave
    *************
    ► bit.ly/3OHHoC9
    ► bit.ly/3IeNLdv
    ► bit.ly/2J4tPeT
    ► bit.ly/3ydSkAq
    Selenium With Python Using Robert Framework
    (Web&API Testing)
    ********
    ► bit.ly/3nUvlpr
    ► bit.ly/3nUvE3z
    API Testing (Postman,SoapUi,&Rest Assured)
    *************
    ► bit.ly/3OXacWY
    ► bit.ly/3yh0UhE
    ► bit.ly/3nC9DWQ
    ► bit.ly/3yGfhNS
    ► bit.ly/3OJa11H
    ► bit.ly/3P2slCC
    Mobile App Testing Appium
    ************
    ► bit.ly/3Al49HG
    Performance Testing Jmeter
    ************
    ► bit.ly/3nz4fE7
    Maven,Jenkins,Git,Github,CI/CD
    ***********
    ► bit.ly/3P16HPj
    ► bit.ly/3yhlUVA
    ► bit.ly/3afYfwT
    ► bit.ly/3yGzweG
    ► bit.ly/3yF73Ws
    ► bit.ly/3NCOmH7
    SQL,DB Testing&ETL,Bigdata
    **********
    ► bit.ly/3NKOcNY
    ► bit.ly/3OVpDyI
    ► bit.ly/3NEvUy0
    ► bit.ly/3IryxlT
    ► bit.ly/3RkWBLh
    JavaScript Based Automation Tools
    ************
    ► bit.ly/3nUx51X
    ► bit.ly/3AqI6Q0
    ► bit.ly/3yeurbT
    ► bit.ly/3ujzpTK
    Selector Hub Tools
    *******
    ►rb.gy/h3h424
    GraphQL
    ********
    ► rb.gy/sj3gys
    Cypress API Testing
    ***********
    ► shorturl.at/fjKPX
    Cypress Web Testing
    ***********
    ► shorturl.at/agjlK
    Playwright with Javascipt
    **********
    ► shorturl.at/adSTY

ความคิดเห็น • 128

  • @mikeroberts4588
    @mikeroberts4588 ปีที่แล้ว +4

    As someone who has been working with Postman for some time, this course has been invaluable to re-enforcing what I do know, as well as teaching me some tricks I did not. Your teaching style is second to none. Many thanks for the hard work you have put into this course. I look forward to following the RestAssured course next.

  • @r.rajalakshmi369
    @r.rajalakshmi369 3 หลายเดือนก่อน +3

    God bless you sir. You are a proper example of how a Guru has to be. You are great sir.

    • @sdetpavan
      @sdetpavan  3 หลายเดือนก่อน +1

      Thank you

  • @faisal_the_leo
    @faisal_the_leo ปีที่แล้ว +28

    Some people want to be Astronaut, some want to be Super Hero. I want to be PAVAN Sir :)

  • @ramakrishnavaidya7296
    @ramakrishnavaidya7296 9 หลายเดือนก่อน +4

    My Dear Sir, There are no words to praise your knowledge and the way of explanation. i am watching all your video.

    • @sdetpavan
      @sdetpavan  9 หลายเดือนก่อน

      Thanks

    • @annajyothi7773
      @annajyothi7773 4 หลายเดือนก่อน

      Bro nen automation testing side unnanu..eppdu ee postman tool for automation cover aindha ee course ??

  • @rsrsn8810
    @rsrsn8810 ปีที่แล้ว +1

    Everything is wonder by you Sir, as of now What I know knowledge on Selenium Project oriented that credit goes to you only.
    In outside even they take amount also waste but from you its greatness Pavan uncle 🇮🇳

  • @alcor15519
    @alcor15519 5 หลายเดือนก่อน +1

    Thank you for the sequentially well organised and super detailed sessions. Most grateful 🙏🙏🙏

    • @sdetpavan
      @sdetpavan  5 หลายเดือนก่อน

      Welcome

  • @ksdnsdkumar1375
    @ksdnsdkumar1375 ปีที่แล้ว +7

    @1:18 Running XAMPP server
    @2:25 Opening e-Commerce API'
    @3:04 Creating API user
    @05:06 Generating API key of API user
    @06:30 API documentation
    @24:56 Create collection in POSTMAN
    @28:03 Create collection variables in POSTMAN
    @33:23 Create token using POST request with variables and API key
    @35:32 (pm library) Validate status code and JSON response
    @39:04 (pm library) Create collection variable for API key from JSON response to use as authorization for next requests
    @43:20 Add product to cart using POST request with variables
    @44:11 Refer collection variable to use as authorization
    @46:19 (pm library) Create Product ID & quantity using collection variable in pre request script
    @51:43 (pm library) Validate status code and JSON response
    @55:12 Create GET request with product ID as input
    @58:12 (pm library) Validate status code and JSON response
    @58:28 (pm library) Create enviroment variable for cart ID from JSON response for next requests
    @01:02:57 create POST request using enviroment variable for cart ID to update quantity
    @01:05:57 (pm library) Validate status code and JSON response
    @01:07:38 create POST request using enviroment variable for cart ID
    @01:08:21 (pm library) Validate status code, validate JSON response and delete all variables
    @01:12:28 Run as collection
    @01:17:28 Install nodejs
    @01:19:07 Install newman
    @01:21:07 Export collection & run in command prompt
    @01:25:13 General HTML report
    @01:31:13 Run collection remotely using url
    @01:35:12 Start JENKINS
    @01:38:20 Run collection in JENKINS
    @01:43:50 General HTML report in JENKINS
    @01:46:34 Create empty repository in GITHUB
    @01:47:43 Push collection into remote repository
    @01:55:33 Run GITHUB collection in JENKINS

    • @Rana-Farhan
      @Rana-Farhan 8 หลายเดือนก่อน +1

      Appreciate the effort.

  • @rsrsn8810
    @rsrsn8810 ปีที่แล้ว +2

    Superb sir to start Early 😘😍

  • @suyashnachankar9342
    @suyashnachankar9342 6 หลายเดือนก่อน +1

    I must say "THANK YOU VERY MUCH PAVAN SIR" for all the efforts you have taken for sharing this knowledge here 🙏🙏😊😊 Truly grateful for your valuable teachings ! This was really helpful.

    • @sdetpavan
      @sdetpavan  6 หลายเดือนก่อน +1

      It's my pleasure

  • @user-wo3uc5oh5o
    @user-wo3uc5oh5o 5 หลายเดือนก่อน +1

    That was amazing session. Sir, thank you so much! You are the best!

    • @sdetpavan
      @sdetpavan  5 หลายเดือนก่อน

      You are very welcome

  • @RutujaPatil143
    @RutujaPatil143 ปีที่แล้ว +2

    Heartly welcome sir..

  • @chayae3740
    @chayae3740 หลายเดือนก่อน +1

    Thank you for this brief explanation

    • @sdetpavan
      @sdetpavan  หลายเดือนก่อน

      You are welcome!

  • @sangeetasingh1262
    @sangeetasingh1262 4 หลายเดือนก่อน +1

    Thank you sir. These classes are very helpful for beginners

    • @sdetpavan
      @sdetpavan  4 หลายเดือนก่อน

      Welcome

  • @sthue1001
    @sthue1001 2 หลายเดือนก่อน +1

    Thanks! Great course!

    • @sdetpavan
      @sdetpavan  2 หลายเดือนก่อน

      You're welcome!

  • @v2factsandupdates327
    @v2factsandupdates327 ปีที่แล้ว +1

    Awesome videos

  • @yashipandey4771
    @yashipandey4771 หลายเดือนก่อน +1

    Thankyou Sir :)

    • @sdetpavan
      @sdetpavan  หลายเดือนก่อน

      Most welcome!

  • @BugHunterMdSam
    @BugHunterMdSam หลายเดือนก่อน +1

    Thank you sir

    • @sdetpavan
      @sdetpavan  หลายเดือนก่อน

      Welcome

  • @acho393
    @acho393 ปีที่แล้ว +1

    Superb .....

  • @karthiksundaram544
    @karthiksundaram544 5 หลายเดือนก่อน +1

    Superb teaching ❤

    • @sdetpavan
      @sdetpavan  5 หลายเดือนก่อน

      Thanks

  • @stevenclark1973
    @stevenclark1973 ปีที่แล้ว +1

    Great video again. When checking the status... should you be using "statusCode" rather than "status"? I got an error message back as status was equal to "OK", rather than "200"

  • @nagasaimaddula56
    @nagasaimaddula56 หลายเดือนก่อน +1

    Super explaination 🎉..

    • @sdetpavan
      @sdetpavan  หลายเดือนก่อน

      Thank you

  • @abhijeetrokade4049
    @abhijeetrokade4049 ปีที่แล้ว

    Great explanation!! Please provide Postman Collection for reference

  • @plgopi
    @plgopi 7 หลายเดือนก่อน +2

    Hello Pavan. Where can I find the documentation you say in the videos that you are going to provide?

  • @mahesh1724
    @mahesh1724 ปีที่แล้ว +1

    Hi sir... Very useful video ... THANK U SO MUCH SIR ...

    • @sdetpavan
      @sdetpavan  ปีที่แล้ว +1

      Welcome

    • @mahesh1724
      @mahesh1724 ปีที่แล้ว

      @@sdetpavan I Start my day watching your video sir..

    • @raghavvohra8867
      @raghavvohra8867 ปีที่แล้ว

      @@mahesh1724 Could you help me with my doubt?
      Getting AssertionError: expected undefined to deeply equal "Success: API session successfully started!"
      Please provide your guidance on it. Since, bcoz of this I can't generate Token.

  • @andyselvam9809
    @andyselvam9809 ปีที่แล้ว +1

    Waiting for the session sir😊😊😊

    • @raghavvohra8867
      @raghavvohra8867 ปีที่แล้ว

      @Andy Selvam Getting AssertionError: expected undefined to deeply equal "Success: API session successfully started!"
      Could you help me in solving it?

  • @user-zi5xi7on5i
    @user-zi5xi7on5i 9 หลายเดือนก่อน

    👍

  • @rifataminrabby5004
    @rifataminrabby5004 ปีที่แล้ว

    Yes

  • @r.rajalakshmi369
    @r.rajalakshmi369 3 หลายเดือนก่อน +1

    Sir, enga iruku inda document. Pls link share paunnunga. BTW you are awesome. Sir, where or how to get these documents and collections. Pls guide.

  • @femigideon1213
    @femigideon1213 5 หลายเดือนก่อน

    Hi Pavan! If I decide to use localhost would there still be a need to create a baseURL?

  • @madhudusa8982
    @madhudusa8982 ปีที่แล้ว

    Sir your explanation very wonderful but telugu vallakosam SpringBoot Telugu Lo explain cheyandi please

  • @AkashGupta-tm2cj
    @AkashGupta-tm2cj ปีที่แล้ว

    Can we please have WebDriverIO Tutorial sessions with JavaScript or Typescript? 🙏

  • @sameerhaldikar5114
    @sameerhaldikar5114 ปีที่แล้ว +1

    All knows nobody can beat pavan putra in power like also nobody can beat , compare pavan sir in testing 🙏🙏

  • @ramuchowdary2072
    @ramuchowdary2072 ปีที่แล้ว

    Hi Pavan garu, can you please upload karate framework videos...please 🙏

  • @bchinnareddy7527
    @bchinnareddy7527 ปีที่แล้ว

    Hi sir did you do the spring and springboot classes.If In case is there classes in your channel can you please send me links sir.

  • @sunandapavan8538
    @sunandapavan8538 5 หลายเดือนก่อน +2

    Hi Sir, those who are watching and learning from TH-cam, how can that get those Documents which you provided in Videos .
    Is there anyway to get that pls let us Know.

  • @skajharuddin6810
    @skajharuddin6810 ปีที่แล้ว +1

    Sir how many sessions left for this appi testing.

  • @yogeshnagpure
    @yogeshnagpure ปีที่แล้ว +1

    I'm getting error while running by using url of collection.. Message showing:- collection could not be loaded
    Error fetching the collection from the provided url. Ensure that the url is valid. Invalid API key. Every request requires a valid API Key to be sent.
    Pls reply ASAP

  • @sumitpote4413
    @sumitpote4413 ปีที่แล้ว

    Hi Pavan Sir, when will start upcoming selenium batch?

  • @eswaridevikurasala174
    @eswaridevikurasala174 ปีที่แล้ว +1

    Hi sir can you please provide tosca automation testing class

  • @deeptisharma9154
    @deeptisharma9154 หลายเดือนก่อน

    thanks sir......qc_cart table ........who will make the table......is it already present q2 why git build is pass even if tests are failing in windows execute batch command?

  • @rahulhirlekar6918
    @rahulhirlekar6918 ปีที่แล้ว +2

    Hello sir , i tried to create a session/token number with first post request but getting response in html format not in json format whenever i try to put value key and username under form data tab but getting 200 as status code.

  • @bhargavapoola1651
    @bhargavapoola1651 ปีที่แล้ว

    Sir, one small query when will use pm.response.json and Json.parse(response body) and what is the difference???. I am little confusing about these two statements.

    • @rohithsj5066
      @rohithsj5066 ปีที่แล้ว +1

      Bhargava Poola for ur question the answer is below:
      pm.response.json is used when we are validating the response body and
      Json.parse(response body) is used to extract the id from the response body

  • @RakibulHasan-mu1ob
    @RakibulHasan-mu1ob ปีที่แล้ว

    In real time how /Whr we will get API as a QA tester ?

  • @_videowall_
    @_videowall_ หลายเดือนก่อน

    Sir i did not abke to generate api token @38.14 timestamp... Did any documentation is changed or what? #pavansir #sdetQA

  • @sahanaradha2573
    @sahanaradha2573 ปีที่แล้ว +1

    Thank u sir... How to contact u you sir.. I sent a mail to u sir... But no reply.. Regarding automation online course...

  • @faisalsakib9586
    @faisalsakib9586 ปีที่แล้ว

    hello sir... i m not getting the version recommended version: 7.4.29/PHP 7.4.29 in the path ...can anyone please let me know where I can download it. I am trying so hard

  • @srisricreations675
    @srisricreations675 ปีที่แล้ว

    Hi sir i need to join Selenium with Java i have registered and sent an email but did not get any reply.could you please reply sir

  • @ankitpatil142
    @ankitpatil142 ปีที่แล้ว +1

    From where Your Notes download?????

  • @siddarths3295
    @siddarths3295 ปีที่แล้ว +2

    While creating session token, after the send process.. postman body is opening xampp server, but no token is created and the status code is 200
    Can anyone help me to resolve this

    • @SagarPawar-zi4py
      @SagarPawar-zi4py 2 วันที่ผ่านมา

      yes, same thing happen my side also

  • @sdetbyraviteja568
    @sdetbyraviteja568 ปีที่แล้ว

    32:48 even here also you are showing different URL sir.But in the baseURL variable you have given different URL sir. Please give me a reply

  • @sdetbyraviteja568
    @sdetbyraviteja568 ปีที่แล้ว +1

    33:36 exactly whatever the Base URL you have shown us and whatever the BASE URL you have taken at collection variables is too different sir.. that's why i am getting 404 not found please give me a clarity on that sir

  • @user-dx7ek2sz8v
    @user-dx7ek2sz8v ปีที่แล้ว

    Hi, Mr PAVAN, thanks your effort, I have get underline error in excuteScript fonction in javascriptExcutor.

    • @raghavvohra8867
      @raghavvohra8867 ปีที่แล้ว

      Getting AssertionError: expected undefined to deeply equal "Success: API session successfully started!"
      Could you help me in solving it!

  • @amanwadte1495
    @amanwadte1495 10 หลายเดือนก่อน

    Sir i am getting response body in html format.
    There was an error in evaluating the test script: JSONError: Unexpected token '

    • @rashmikumari9397
      @rashmikumari9397 10 หลายเดือนก่อน

      are you get the answer same problem with me also

    • @karthika8610
      @karthika8610 9 หลายเดือนก่อน

      Same here too. Did you figure it out

    • @karthika8610
      @karthika8610 9 หลายเดือนก่อน

      Ok. I gave the ip address wrong here. Once i changed it, it is working now.

  • @ssalim471
    @ssalim471 ปีที่แล้ว

    can I download udemy lectures,after subscription...?

  • @abuhamja7844
    @abuhamja7844 ปีที่แล้ว +1

    I am stuck in the "get cart content" where it shows the error {
    "error": {
    "warning": "Warning: You do not have permission to access the API!"
    }
    }
    How to fix it please

    • @sagarsuryavanshi1045
      @sagarsuryavanshi1045 10 หลายเดือนก่อน

      HI same error I am getting can you please help me too thanks in advance

    • @kailaswagh8609
      @kailaswagh8609 4 หลายเดือนก่อน

      please check API user . IP address entered is correct. don't keep blank space before ip

  • @ramarajuvarma3986
    @ramarajuvarma3986 ปีที่แล้ว +1

    Hi pavan, i could able to create session/api token, but when i am trying to add the product to cart getting "{ "Warning: You do not have permission to access the API!"}. Can you please help me in fixing this issue

  • @raghavvohra8867
    @raghavvohra8867 ปีที่แล้ว

    @sdetpavan Sir, Getting AssertionError: expected undefined to deeply equal "Success: API session successfully started!"
    Please provide your guidance on it. Since, bcoz of this I can't generate Token.

    • @raghavvohra8867
      @raghavvohra8867 ปีที่แล้ว

      @SDET- Automation Techie Sir, Kindly respond. I am waiting for your reply! It seems their is some issue in the API!

    • @BackupTwo-xv9wv
      @BackupTwo-xv9wv ปีที่แล้ว

      You can comment out the checking success msg in response test script, and then send the request you will get the access token in response body. No need to run the checking success msg test script.🙂

    • @abhaysinhgaikwad
      @abhaysinhgaikwad ปีที่แล้ว

      sir please resopnd

  • @Sirjyotiprakash143
    @Sirjyotiprakash143 ปีที่แล้ว

    Sir Full course mileta

  • @uti894
    @uti894 ปีที่แล้ว

    Hello, how can we have an additional income as testers, I know there are some sites that pay you to find bugs, have you tried them, how do you proceed with these sites?

    • @devendrasalunkhe1791
      @devendrasalunkhe1791 5 วันที่ผ่านมา

      pleas tell me the sites that they pay to find bugs

  • @ganeshjadhav9112
    @ganeshjadhav9112 ปีที่แล้ว

    38:02 after this step i am getting this error. how to solve this issue?
    JSONError: Unexpected token '

    • @ganeshjadhav9112
      @ganeshjadhav9112 ปีที่แล้ว

      Log in API is returning HTML content how to solve this? anyone can now to to resolve this issue?

  • @meenak5846
    @meenak5846 ปีที่แล้ว

    Hi In getting token(First POST request) itself, Iam getting empty response [] but status is 200. Can you let me know how to fix this

    • @siddarths3295
      @siddarths3295 ปีที่แล้ว

      Same here but for me xampp index page is showing in body

    • @uday.7777
      @uday.7777 ปีที่แล้ว

      Same problem i am facing now 🥺🥺

    • @uday.7777
      @uday.7777 ปีที่แล้ว

      Did you solve this issue ??

    • @siddarths3295
      @siddarths3295 ปีที่แล้ว

      @@uday.7777 no brother

    • @user-lp4qi2nh5v
      @user-lp4qi2nh5v 5 หลายเดือนก่อน

      add body

  • @abhaysinhgaikwad
    @abhaysinhgaikwad ปีที่แล้ว

    please
    hey anyone please help in this porject
    i'm not getting any resopnse in body
    please help me

  • @srinivaspatel2567
    @srinivaspatel2567 ปีที่แล้ว +1

    {
    "error": {
    "warning": "Warning: You do not have permission to access the API!"
    }
    }

    • @reds2776
      @reds2776 ปีที่แล้ว

      Is this query resolved?

  • @amazongenerationsuccess1355
    @amazongenerationsuccess1355 ปีที่แล้ว

    There was an error in evaluating the test script: JSONError: Unexpected token '

    • @meghashreebanerjee7719
      @meghashreebanerjee7719 ปีที่แล้ว

      same problem. did you get a solution yet?

    • @sonamSharma15
      @sonamSharma15 ปีที่แล้ว

      Any solution?

    • @abhaysinhgaikwad
      @abhaysinhgaikwad ปีที่แล้ว

      @@sonamSharma15 you got any solution

    • @lifeonedge260
      @lifeonedge260 8 หลายเดือนก่อน

      ​@@sonamSharma15 remove the response script keep only status code script first and check it is working or not . Actually Response is not receiving correctly so this error occuring . because there is url problem in post req

  • @meghashreebanerjee7719
    @meghashreebanerjee7719 ปีที่แล้ว +2

    JSONError: Unexpected token '

    • @meghashreebanerjee7719
      @meghashreebanerjee7719 ปีที่แล้ว

      @Prasanna Naik I checked and matched with API doc page's URL. Somehow, opencart has removed the cart module. other two module's code the are showing. I could generate the token, as login page code was available. But, couldn't execute the rest of the requests. Try the following end point for creating session token : api/account/login

    • @sirimallasrinath994
      @sirimallasrinath994 2 หลายเดือนก่อน

      @@meghashreebanerjee7719 you are right!. After changing 'api/account/login' able to generate token. thanks for your suggestion

  • @naaffzz
    @naaffzz 3 หลายเดือนก่อน

    I got this warning
    {
    "error": {
    "warning": "Warning: You do not have permission to access the API!"
    }
    }

  • @aswathys8884
    @aswathys8884 ปีที่แล้ว

    Test:
    pm.test("Status code is 200", function ()
    {
    pm.response.to.have.status(200);
    });
    //capturing the response body of the post request
    var responseBodyData=pm.response.json();
    pm.test("success message of session", function ()
    {
    pm.expect(responseBodyData.success).to.be.eql("Success: API session successfully started!");
    });
    //capturing the token & storing it to an collection variable
    pm.collectionVariable.set("api_token_cv",responseBodyData.api_token);
    When I am executing the create session req, an error "Unexpected token '

    • @rahulgoud7617
      @rahulgoud7617 ปีที่แล้ว

      Same error I'm getting. How to solve this issue?

    • @rahulgoud7617
      @rahulgoud7617 ปีที่แล้ว

      Did you issue solved?

    • @aswathys8884
      @aswathys8884 ปีที่แล้ว

      @@rahulgoud7617 No rahul. Actually, when we send the request, the url is directed to the login page... So, I think that's where the issue is happening. Can anyone help me, to solve this issue?

    • @rahulgoud7617
      @rahulgoud7617 ปีที่แล้ว

      I'm also trying to solve it from 2 days. I'm not finding any solutions

    • @aswathys8884
      @aswathys8884 ปีที่แล้ว

      @@rahulgoud7617 I deleted the collection, and key & created it once more. now it is generating the token for me...