stubby4j와 stubby-db 둘 다 HTTP 호출을 스터핑하는 데 사용할 수 있습니다. XML 페이로드로 SOAP 서비스를 POST HTTP 호출로 간주 할 수 있습니다.
StubbyDB 또는 Stubby4j 중 무엇을 사용해야하는지는 사용자의 필요에 달려 있습니다.
두 개의 프로젝트로 나눌 필요가 없습니다. 여전히 단일 저장소에서 두 스텁 호출을 모두 가질 수 있습니다. 그러나 stubby4j를 사용하면 두 파일의 매핑을 분할 할 수 없습니다. stubby-db를 사용하여 매핑 파일을 원하는 수만큼 가질 수 있습니다.
편집
SOAP
- request:
method: POST
url: /soap-simulator/services/ServiceName
post: actionName[\s\S]*mobile.([0-9]+)
response:
status: 200
latency: 0
headers:
content-type: text/xml
strategy: "first-found"
files: ["stubs/<% post.1 %>/response.xml","stubs/ServiceName/actionName/default.xml"]
REST
- request:
method: POST
url: /soap-simulator/services/ServiceName/actionName
post: mobile.([0-9]+)
response:
status: 200
latency: 0
headers:
content-type: text/xml
strategy: "first-found"
files: ["stubs/<% post.1 %>/response.xml","stubs/ServiceName/actionName/default.xml"]
체크 아웃이 :은 https : //github.com/jwagenleitner/groovy-wslite – Rao
감사 @Rao 나누었다 I 코드가 스텁 서버를 작성하는 데 사용될 수 있다고 생각하십시오. 하지만 위의 두 가지 도구가 아닌가요? – anil
나는 [여기] (https://naturalintelligence.github.io/Stubmatic/#examples)에 대한 상세한 예제를 추가했습니다 –