11장. 예측 함수에 배포된 애플리케이션 끝점 테스트
애플리케이션을 배포한 후 배포된 끝점에서 예측 함수가 제대로 작동하는지 테스트할 수 있습니다.
사전 요구 사항
- 애플리케이션은 예측 기능을 포함하고 함께 구축 및 배포됩니다.
- 예측 함수가 포함된 애플리케이션의 웹 주소를 알고 있습니다.
절차
- 파일 → 새 → 터미널을 클릭하여 jaegerpyterLab에서 터미널 을 엽니다.
다음 명령을 실행하고 <
application-url>을 애플리케이션의 웹 주소로 바꿉니다(예:http://myapp-myproject.apps.mycluster.abc1.s1.devshift.org).curl -X POST -H "Content-Type: application/json" --data '{"data" : "hello world"}' <application-url>/predictions예를 들면 다음과 같습니다.
curl -X POST -H "Content-Type: application/json" --data '{"data" : "hello world"}' http://myapp-myproject.apps.mycluster.abc1.s1.devshift.org/predictions또는
!를 입력하고 새 구성 요소 셀에 동일한 명령을 입력하고 셀을 실행합니다.!curl -X POST -H "Content-Type: application/json" --data '{"data" : "hello world"}' <application-url>/predictions
검증
-
{"predictions" : "not implemented"}와 같은 애플리케이션에서 응답을 받으면 끝점이 작동합니다.