앞으로 주마다 개발/기술적인 부분에서 경험했던 일 및 그에 대한 감상들을 정리하고자 한다
(and 잡담..)
업무
1) 겪은 일
String pathvariable = "pathvariable";
String queryParam = "queryParam"
webTestClient.get()
.uri("/endpoint/{pathvariable}?queryparameterName={queryparameterName}", pathvariable, queryParam)
.exchange()
.expectStatus().isOk()
.expectBody().consumeWith(
document("/document/test",
RequestDocumentation.pathParameters(RequestDocumentation.parameterWithName("pathvariable").description("암호화된 seq")),
RequestDocumentation.queryParameters(RequestDocumentation.parameterWithName("queryParam").description("queryParameter")),
responseFields(
fieldWithPath("code").type(JsonFieldType.STRING).description("repsonseCode"),
fieldWithPath("msg").type(JsonFieldType.STRING).description("msg"),
subsectionWithPath("data").type(JsonFieldType.ARRAY).description("data")
),
responseFields(beneathPath("data[]").withSubsectionId("info"), new FieldDescriptor[]{
subsectionWithPath("dataInfo").type(JsonFieldType.STRING).description("data 하위 정보").optional(),
})
)
);
2) 보완할 점
@ExtendWith({RestDocumentationExtension.class})
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("local")
class RightsControllerTest {
@Autowired
private WebTestClient webTestClient;
@Autowired
private ApplicationContext context;
@BeforeEach
public void setUp(RestDocumentationContextProvider restDocumentation) {
webTestClient = WebTestClient
.bindToApplicationContext(context)
.configureClient()
.filter(documentationConfiguration(restDocumentation))
.exchangeStrategies(ExchangeStrategies.builder()
.codecs(configurer -> configurer.defaultCodecs().maxInMemorySize(-1))
.build())
.build();
}
... 생략
1) 진행한 것
wait = WebDriverWait(driver, 10) # 최대 10초 동안 대기
# load 이벤트가 발생할 때까지 대기
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, 'XPATH 루트 복사해서 사용')))
2) 진행해야 할 것
1) 진행한 것, 알게된 것
2) 진행해야 할 것
개인적