WEB API Test/Postman

SOAP requests 구동

정신차려이각박한세상속에서 2020. 8. 7. 10:03

사전 작업

크롬 확장 프로그램 설치

 

 

Get Soap request url or WSDL url add to request url

아래 예제 URL을 참고하여 등록

http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL

 

 

Set method as POST

위의 URL 복사해서 아래와 같이 복붙

 

 

Set body as raw and set text/xml

 

 

Provide request data in body

위의 페이지에서 크롬 확장 프로그램 실행 후 아래와 같이 클릭

 

클릭하면 아래와 같이 해당 데이터가 나옴

 

아래와 같이 복사 붙여넣기

 

 

Run and validate

테스트 관련 코드를 "Tests"탭에 추가 후 구동!

 

Pubilc Link를 통해서도 테스트가 가능하다

C:\Users\toast>newman run https://www.getpostman.com/collections/600d1b0f5374e88fed46
newman

SOAP Collection

→ http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL
  POST http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL ――[200 OK, 564B, 684ms]
  √  Status code is 200

┌─────────────────────────┬────────────────────┬───────────────────┐
│                         │           executed │            failed │
├─────────────────────────┼────────────────────┼───────────────────┤
│              iterations │                  1 │                 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│                requests │                  1 │                 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│            test-scripts │                  1 │                 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│      prerequest-scripts │                  0 │                 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│              assertions │                  1 │                 0 │
├─────────────────────────┴────────────────────┴───────────────────┤
│ total run duration: 849ms                                        │
├──────────────────────────────────────────────────────────────────┤
│ total data received: 311B (approx)                               │
├──────────────────────────────────────────────────────────────────┤
│ average response time: 684ms [min: 684ms, max: 684ms, s.d.: 0µs] │