private void loadAllSuitesAndCases() throws InstantiationException, IllegalAccessException {
		Set<Class<? extends TestCase>> caseClases = getAllTestCaseClasses();
		
		for (Class<? extends TestCase> caseClass : caseClases) {
			if (isIgnore(caseClass)) {
				continue;
			}
			
			String packageName = caseClass.getPackage().getName();
			TestCase testCase = caseClass.newInstance();
			
			if (packageName == mainPackage.getName()) {
				addCase(testCase);
			} else {
				TestSuite suite = suites.get(packageName); 
				if (suite == null) {
					String[] packageNames = packageName.split("\\.");
					StringBuilder sb = new StringBuilder(packageNames[0]);
					for (int i = 1, len = packageNames.length-1; i < len;++i) {
						sb.append(".");
						sb.append(packageNames[i]);
					}
					String parentSuiteName = sb.toString();
					String suiteName = packageNames[packageNames.length-1];
					suite = new TestSuite(suiteName);
					suites.get(parentSuiteName).addSuite(suite);
					suites.put(packageName,suite);
				}
				suite.addCase(testCase);
			}
		}
	}