2014-03-12 3 views
0

Groovy 스크립트에서 새 끝점을 soapUI의 테스트 케이스 요청에 추가해야합니다. 여기에 내가 나머지 프로젝트를 사용, 내 코드는 다음과 같다 :groovy 스크립트에서 Soap UI의 끝점 설정

def end= testRunner.testCase.getTestStepByName("dd").getHttpRequest().setEndpoint("http://cd-diudara:8280/services/linkedinFollowCompanyPage?wsdl") 

이가 "끝"변수 나에게 null을 받고있다. 이 코드의 문제점은 무엇입니까?

+0

http://forum.soapui.org/viewtopic.php?t= 16436) –

답변

2

예상대로 코드가 작동합니다. 그루브 스크립트를 실행 한 후 testStep을 열면 끝점 표시 줄에 새 끝점이 표시됩니다. 그러나 setEndpoint(endpoint) 메서드는 아무 것도 반환하지 않으므로 "끝"변수에 null이있는 이유입니다. 엔드 포인트를 얻고 싶다면

당신은 getEndpoint() 호출 할 수 있습니다

이 문제는 [soapUI 양식 (에 해결되었을 수
testRunner.testCase.getTestStepByName("dd").getHttpRequest().setEndpoint("http://cd-diudara:8280/services/linkedinFollowCompanyPage?wsdl"); 
def end = testRunner.testCase.getTestStepByName("dd").getHttpRequest().getEndpoint(); 
log.info end; 
관련 문제