여러대의 테스트 서버가 있고
각각의 응답이 잘 오는지 테스트 해보기 위해
간단히 batch 파일로...
echo 명령어를 통하여 hosts파일을 각각 변경하고
ipconfig /flushdns을 통해 hosts를 바로 인식
그리고 wegt을 통하여 api를 호출하고 응답을 txt로 담는다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem hosts file backup | |
xcopy "%systemroot%\system32\drivers\etc\hosts" ".\" /s /y | |
echo 192.168.0.1 openapi.seoul.go.kr #testserver-01 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result01.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.2 openapi.seoul.go.kr #testserver-02 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result02.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.3 openapi.seoul.go.kr #testserver-03 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result03.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.4 openapi.seoul.go.kr #testserver-04 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result04.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.5 openapi.seoul.go.kr #testserver-05 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result05.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.6 openapi.seoul.go.kr #testserver-06 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result06.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.7 openapi.seoul.go.kr #testserver-07 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result07.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.8 openapi.seoul.go.kr #testserver-08 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result08.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.9 openapi.seoul.go.kr #testserver-09 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result09.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
echo 192.168.0.10 openapi.seoul.go.kr #testserver-10 > "%systemroot%\system32\drivers\etc\hosts" | |
ipconfig /flushdns | |
wget -O result10.txt "http://openapi.seoul.go.kr:8088/sample/json/ForecastWarningUltrafineParticleOfDustService/1/5/" | |
@rem hosts file rollback | |
xcopy "hosts" "%systemroot%\system32\drivers\etc\" /s /y |
'IT' 카테고리의 다른 글
[node] 노드 윈도우 node_modules windows path llimitation (0) | 2016.08.13 |
---|---|
[Java] @ModelAttribute 메소드 (0) | 2016.08.07 |
[curl] curl get 호출 해보기 (0) | 2016.07.30 |
[Dos][Batch] 윈도우 서버 여러대 로그 한방 복사 (0) | 2016.06.19 |
[Java][jstl] form tag select option (0) | 2016.05.07 |