꼭 rust에만 해당하는 얘기는 아니지만, cargo로 테스트하는 게 워낙 편해서 계속 쓰고 싶네요...
충분히 테스트된 데스크톱 애플리케이션을 wasm 애플리케이션으로 바꾸고 있어요. IO를 호출 체인의 위쪽으로 옮기고 나니 고칠 코드가 거의 없어서, wasm 애플리케이션을 이루는 코드가 든 라이브러리도 여전히 충분히 테스트된 상태예요.
그런데 전체 “앱”에는 html과 꽤 많은 JS 같은 다른 부분도 있어요. 이걸 전부 테스트하고 싶은데(가능하면 여러 브라우저에서요), 어디서 시작해야 할지 모르겠어요(특히 cargo test와 어떻게 연결하는지요). 아마 웹 서버를 띄워야 할 텐데... 그다음은요? html 폼에 값을 입력하고 제출 버튼을 눌러야 하고, 그 결과 다운로드를 아마 승인한 뒤 내용이 맞는지도 확인해야 해요.
어디를 찾아보면 될지 알려 주실 수 있을까요. 미리 감사해요!
영어에서 번역·원문 보기This isn't necessarily specific to rust, although cargo makes testing convenient enough that I'd quite like to stick with it...
I'm taking a thoroughly tested desktop application and turning it into a wasm application. Once IO was moved higher in the call chain, very little code needed changing, so the library containing the code that makes up the wasm application remains thoroughly tested as a result.
The complete "app", though, includes additional pieces, with some html and a fair amount of JS. I'd like tests covering all of that (ideally across multiple browsers), but don't know where to start (especially with hooking it into cargo test). Presumably a web server has to be started... what comes next? A html form needs input, its submit button needs clicking, and a resulting download probably needs approving before its contents can be verified.
Could somebody suggest where I should start looking. Thanks beforehand!