inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

더 자바, 애플리케이션을 테스트하는 다양한 방법

chaos monkey 실습중에 문의드립니다.

281

김태경

작성한 질문수 2

0

안녕하세요. 좋은 강의 감사드립니다.

카오스몽키 테스중에 윈도우 환경이라 테스트를 Postman툴을 활용해서 테스트해보고 있는데요.

아래 명령어를 POST로 입력하면 404에러가 발생합니다. 혹시 이유를 알 수 있을까요?

그리고, 강사님처럼 cmd환경에서 http명령을 직접 수행할 수 있는 툴(윈도우)이 있을까요?  감사합니다.

http://localhost:8080/actuator/chaosmonkey/assaults level=3 latencyRangeStart=2000 latencyRangeEnd=5000 latencyActive=true

{
    "timestamp""2021-04-11T04:24:40.237+0000",
    "status"404,
    "error""Not Found",
    "message""No message available",
    "path""/actuator/chaosmonkey/assaults%20%20level=3%20latencyRangeStart=2000%20latencyRangeEnd=5000%20latencyActive=true"
}

curl을 활용해서 해봐도 에러가 발생합니다.

$ curl -X POST http://localhost:8080/actuator/chaosmonkey/assaults level=3 latencyRangeStart=2000 latencyRangeEnd=5000 latencyActive=true
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 403 0 403 0 0 9372 0 --:--:-- --:--:-- --:--:-- 9595{"timestamp":"2021-04-11T04:34:47.632+0000","status":400,"error":"Bad Request","message":"Required request body is missing: public org.springframework.http.ResponseEntity<java.lang.String> de.codecentric.spring.boot.chaos.monkey.endpoints.ChaosMonkeyRestEndpoint.updateAssaultProperties(de.codecentric.spring.boot.chaos.monkey.endpoints.AssaultPropertiesUpdate)","path":"/actuator/chaosmonkey/assaults"} % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: level=3 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: latencyRangeStart=2000 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: latencyRangeEnd=5000 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: latencyActive=true

chaosmoney testcontainers JMeter mockito Chaos-Monkey ArchUnit java JUnit

답변 1

0

백기선

https://httpie.io/docs#windows-etc

HTTPie 웹 사이트에서 보니 윈도에서는 파이선을 통해 지원하고 있나보네요.

그리고 404 에러는 해당 요청을 처리하는 핸들러가 없을 때 발생하는데 서버쪽에서 카오스멍키 설정이 제대로 된건지 확인해 볼 필요가 있겠습니다.

테스트 반복하기 관련 질문입니다

0

102

1

Testcontainers ddl-auto 동작 시점

0

221

2

testcontainers DB 공유 이슈

0

238

2

질문있습니다.

0

334

3

동시성 테스트는 어떻게 작성해야하는지 궁금합니다.

2

1234

0

안녕하세요, 테스트의 displayName 관련 질문이 있습니다!

0

469

0

intellij 테스트 실행시 engine 이 나오게 하는 방법이 궁금합니다.

0

412

0

thenThrow() 안에는 runtime 익셉션만 선언가능한가요?

0

1348

1

안녕하세요 @BeforeAll관련해서 질문이 있습니다.

0

390

1

Test 중단 방법(?)

1

428

1

junit 프로퍼티

1

411

1

강의 섹션별 Git Code

1

365

1

Gradle 프로젝트

0

359

1

강의 문서

0

398

1

if나 case를 통한 분기와 Assumptions의 차이점 문의

1

380

1

Study .setOwnerId( id ) 로 예제를 구성하신 이유가, 특정한 시나리오를 가정하기 때문인가요?

0

319

1

Mock에 Stubbing 중 발생하는 에러

0

3986

1

제 블로그에 공부 내용을 정리해도 될까요?

1

382

1

@Order와 @Order가 없는 순서가 있는 케이스

0

440

1

enum은 또 "이늄"인가요?

-5

1709

2

"assume" 발음이 "어줌"인가요?

-7

1620

4

검색을 해도 해결이 안되어 질문드립니다

0

2210

1

test 환경의 다른 컨테이너(Mock 어플리케이션)

0

378

2

중복 저장

0

299

1