Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- Python
- nodejs
- Logging
- Vue
- loguru
- post
- Java
- d3js
- ubuntu
- Spring
- svelte
- Shell
- fetch
- NextJS13
- vuex
- gradle
- react
- NextJS
- npm
- InteliJ
- 오라클
- fastapi
- springboot
- vitejs
- Vue3
- sveltekit
- Test
- style
- JUnit
- EUREKA
Archives
- Today
- Total
양군의 행복한 이야기
JUNIT 3(테스트 실행-테스트 이름 표기) 본문
src/test/java/co/kr/junit/study/ApplicationTest.java
package co.kr.junit_study;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest --> 1
class ApplicationTest {
@Test -->2
@DisplayName("기본 테스트 시작") --> 3
void contextLoads() {
System.out.println("JTestSucc");
assertTrue(true); -->4
}
}
1. @SpringBootTest -> 스프링부트 환경에서 테스트를 진행 하다
2. @Test -> 테스트 메서드라고 표기 한다.
3. @DisplayNmae -> 테스트를 진행 결과에 설명을 넣는다.
4. 결과를 표기한다. Assertions.assertTrue(?) 는 결과 같이 True여야 한다.
기본 테스트 셈플 이다.
1. 항목으로 스프링 부트의 환경을 사용 할 수 있다.