????????????????????ò????·
???????????? ???????[ 2015/11/26 14:09:50 ] ??????????????? ???????
???????????????
????????????????controller??????????????????????????????????????????????в?????
????1 @RunWith(SpringJUnit4ClassRunner.class)
????2 @ContextHierarchy({
????3 @ContextConfiguration("classpath:spring/business-config.xml")??
????4 @ContextConfiguration("classpath:spring/mvc-core-config.xml")
????5 })
????6 @WebAppConfiguration
????7 @ActiveProfiles("jdbc")
????8 public class PetControllerIT {
????9
????10 @Autowired
????11 private WebApplicationContext context;
????12
????13 @Test
????14 public void should_set_pet_types_in_model() throws Exception {
????15 MockMvc mockMvc = webAppContextSetup(context).build();
????16 RequestBuilder getNewPet = get("/owners/1/pets/new");
????17 mockMvc.perform(getNewPet)
????18 .andExpect(model().attributeExists("types"))
????19 .andExpect(request().sessionAttribute("pet"?? instanceOf(Pet.class)));
????20 }
????21 }??????????????????????????2?????
???????3?????4?У????????Spring????????????????????
???????16?У????????????ó???????????URL?????GET??????????????????
???????18?У???????????model???????а?????types???????
?????????19?У????????????а?????pet?????????????????????????????????????????Pet????
?????????instanceOf()??????????????Hamcrest API?????????
?????????Щ???????????
?????????????????????PetClinic???????Щ????????????????????????Hypersonic SQL????????????????????schema???????????Щ???????Щ????????????????????????????????????ó????У??????????????????????????????????ò????????????????????????в??????????г??????????????????????????л??????????????????????????????????п??????????????????????????????????н?????????????????
????????????????????????????PetController?е?initCreationForm()??????????????????????????????????processCreationForm()????????á?????????????г???????????????????????в?????????????????????в???????????????????????????????ζ???????????????????????ò??????????????????????????????????????????????????????????????????????????????????????????????JUnit????????????????????????????????????????
????????????????????????????????????????????FTP???????????д??????????????????????????????????????mock???????????????д????κμ??????????????????????м?鸴???JPA??????????????????mock???????????????????????????????????????????????????????????????????????????????????????????£?????????????????????????????????????????????й?????Щ??????????????
????????????????????????κ??????web??ó????У??????????????????????web service????????????????????????????????????????????ó???????????????web service??????????????ó?????????????????Э??????????????????????????Щweb service????????????????????????????????????????????????????????SOAP??REST????????
?????????????ó?????????????Spring??????Java EE???????????????????ò??????Java EE????????????????????CDI???????????????????autowiring???????????????ó?????ζ?????????????????????????????????????????????Java EE????????????ó??????????????????????÷???????????????ó?????????????????????????????????????????????????е????????????????????????г????????
????????
??????????У????????????????????Щ???????????????????????????????????????Spring MVC web???????????
???????????????????????д?????Щ???????????????????????????????????????????????
?????????е?????????Щ????????????????????о????????????????????????????????????Integration Testing from the Trenches????飬???????????????????????????????????????????Щ????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
iOS???????mocha??chai??sinon??istanbul???????????????????????????????????????д?????Java????????7??????Android?????????Robolectric3.0????(?)???Kiwi?????????????????????????????????Python?????????????????????????????????????Controller????????д?????????10???????????????????Angular????????????Component??Directive??Pipe ???ServiceAndroid????????????????????????????????--Mockito??????iOS UnitTest???????Vue?????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????