2017-12-20 2 views
0

soapui의 속성 확장을 기반으로 처리하는 동안 동적 속성을 만들려고합니다. 재산에 soapui의 속성 확장은 예상 값이 아닌 문자열 만 반환합니다.

은 변수 이름은 pkSSN이고 동적 값은 ${createIP -OSIClaimant#Response#//en:name/ssn/text()}

Where: 
1. createIP -OSIClaimant is test step name 
2. Response (tag is present in the response of the test step) 
3. //en:name/ssn/text() xpath of the value 

그것은 '123456789'와 같은 사회 보장 번호 (SSN) 태그의 값을 반환해야이지만이 [${createIP -OSIClaimant#Response#//en:name/ssn/text()}].

나는이 링크를 따라하고 "https://www.soapui.org/scripting---properties/property-expansion.html#2-Dynamic-Properties"하지만 여전히 음수 출력. 누군가 내가 여기서 잘못하고있는 것을 나에게 제안 해 줄 수 있습니까?

+0

당신이 속성 확장을 사용하는 네임 스페이스를 없거나 다른 곳에서하는 내가 생각

를 달성하기 위해 노력하고 무엇을 검색 할 수있다? – craigcaulfield

+1

응답을 보지 않고 추출 할 데이터가 무엇이든 제안하기는 어렵습니다. – Rao

+0

어떤 SOAPUI 버전을 사용합니까? –

답변

1

enter image description here

1) ConversionRate

에게 제
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/"> 
<soapenv:Header/> 
<soapenv:Body> 
    <web:ConversionRate> 
    <web:FromCurrency>DZD</web:FromCurrency> 
    <web:ToCurrency>ALL</web:ToCurrency> 
    </web:ConversionRate> 
</soapenv:Body> 
</soapenv:Envelope> 

2) SOAP 요청

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/"> 
<soapenv:Header/> 
<soapenv:Body> 
    <web:ConversionRate> 
    <web:FromCurrency>USD</web:FromCurrency> 
    <web:ToCurrency>${ConversionRate#Request#//web:ConversionRate[1]/web:FromCurrency[1]}</web:ToCurrency> 
    </web:ConversionRate> 
    </soapenv:Body> 
</soapenv:Envelope> 

그래서 명령

을 전 2 요청을 생성하고 그 2 요청 이하 갖는다
${ConversionRate#Request#//web:ConversionRate[1]/web:FromCurrency[1]} 

당신이 멋져요 테스트 단계에서

+1

정말 고마워요. – pk786

관련 문제