Eclipse+Spring 하 Ant 자동화 테스트
프로젝트 는 MyEclipse 8.6 을 사용 하여 개발 하고 사용 하 는 Spring 입 니 다.다음은 제 자동화 테스트 스 크 립 트 입 니 다.하하
/**
*      BeanFactory     
* @author Administrator
*
*/
public class BeanFactory {
private static ApplicationContext context ;
static{
context = new ClassPathXmlApplicationContext("applicationContext.xml");
}
private BeanFactory(){
}
public static Object getBean(String beanName){
return context.getBean(beanName);
}
}/**
 *        
 */
public class SeoKeyServiceTest {
	
	static SeoKeyService seoKeyService;
	@BeforeClass
	public static void init(){
		seoKeyService = (SeoKeyService)BeanFactory.getBean("seoKeyService");
	}
	@Test
	public void testBasic(){
		SeoKeyWord skw = new SeoKeyWordTestFactory().getBrandKeyWord();
		skw = seoKeyService.saveSeoKeyWord(skw);
		assertNotNull(skw);
		seoKeyService.deleteSeoKeyWord(skw.getId());
		skw = seoKeyService.getSeoKeyWordById(skw.getId());
		assertTrue(skw == null);
	}
}다음은 제 자동화 테스트 스 크 립 트 입 니 다.complie 과정 없 이 Eclipse 의 Build Automatically 를 사용 합 니 다.
	
		***    
	 
	
	
		
		
	   
	
		
	  
	
		
		
			
				
				
				
			    
			 
			
			 
			  
			 
		  
	  
  
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Ant tool in EclipseWe can install JRE and Ant standalone in our operation system and configure the Ant command avaiable in the command line...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.