public TestEntry getTest(QName qname) { return (TestEntry) getEntry(testMap, qname); }
public List<FunctionEntry> getFunctions(QName qname) { return getFunctions("{" + qname.getNamespaceURI() + "}" + qname.getLocalPart()); }
for (String suiteId : index.getSuiteKeys()) { SuiteEntry suite = index.getSuite(suiteId); System.out.print("Suite " + suite.getPrefix() + ":" + suite.getLocalName());
/** * Loads all of the XSL executables. This is a time consuming operation. * * @param index * @param sourcesName * A stylesheet reference. * @throws Exception * If the stylesheet fail to compile. */ public void preload(Index index, String sourcesName) throws Exception { for (String key : index.getTestKeys()) { TestEntry te = index.getTest(key); loadExecutable(te, sourcesName); } for (String key : index.getFunctionKeys()) { List<FunctionEntry> functions = index.getFunctions(key); for (FunctionEntry fe : functions) { if (!fe.isJava()) { loadExecutable(fe, sourcesName); } } } }
public void execute_profile(String profileName, List<String> params, boolean required) throws Exception { ProfileEntry profile = index.getProfile(profileName); if (profile == null) { throw new Exception("Error: Profile " + profileName + " not found."); SuiteEntry suite = index.getSuite(profile.getBaseSuite()); if (suite == null) { throw new Exception("Error: The base suite (" List<String> baseParams = LogUtils.getParamListFromLog( engine.getBuilder(), log); TestEntry test = index.getTest(testId); if (suite.getStartingTest().equals(test.getQName())) { ArrayList<String> kvps = new ArrayList<String>();
masterIndex = Generator.generateXsl(setupOpts); if (indexFile != null) { masterIndex.persist(indexFile); masterIndex = new Index(indexFile); if (masterIndex.outOfDate()) { System.out .println("Warning: Scripts have changed since this session was first executed."); masterIndex = Generator.generateXsl(setupOpts); if (indexFile != null) { masterIndex.persist(indexFile); return; masterIndex = new Index(indexFile); if (masterIndex.outOfDate()) { System.out .println("Warning: Scripts have changed since this session was first executed."); if( masterIndex != null) masterIndex.setElements(null); else masterIndex = new Index(); TEClassLoader cl = new TEClassLoader(findResourcesDirectory(sourceFile)); Engine engine = new Engine(masterIndex, setupOpts.getSourcesName(), cl);
public void reexecute_test(String testPath) throws Exception { Document log = LogUtils.readLog(opts.getLogDir(), testPath); String testId = LogUtils.getTestIdFromLog(log); TestEntry test = index.getTest(testId); net.sf.saxon.s9api.DocumentBuilder builder = engine.getBuilder(); XdmNode paramsNode = LogUtils.getParamsFromLog(builder, log); List<String> profiles = opts.getProfiles(); if (profiles.contains("*")) { for (String profile : index.getProfileKeys()) { try { execute_profile(profile, params, false);
ParserEntry pe = index.getParser(key); Object instance = null; if (pe.isInitialized()) {
for (String profile : index.getProfileKeys()) { try { execute_profile(profile, params, false);
for (String suiteId : index.getSuiteKeys()) { SuiteEntry suite = index.getSuite(suiteId); System.out.print("Suite " + suite.getPrefix() + ":" + suite.getLocalName());
/** * Loads all of the XSL executables. This is a time consuming operation. * * @param index * @param sourcesName * A stylesheet reference. * @throws Exception * If the stylesheet fail to compile. */ public void preload(Index index, String sourcesName) throws Exception { for (String key : index.getTestKeys()) { TestEntry te = index.getTest(key); loadExecutable(te, sourcesName); } for (String key : index.getFunctionKeys()) { List<FunctionEntry> functions = index.getFunctions(key); for (FunctionEntry fe : functions) { if (!fe.isJava()) { loadExecutable(fe, sourcesName); } } } }
public void execute_profile(String profileName, List<String> params, boolean required) throws Exception { ProfileEntry profile = index.getProfile(profileName); if (profile == null) { throw new Exception("Error: Profile " + profileName + " not found."); SuiteEntry suite = index.getSuite(profile.getBaseSuite()); if (suite == null) { throw new Exception("Error: The base suite (" List<String> baseParams = LogUtils.getParamListFromLog( engine.getBuilder(), log); TestEntry test = index.getTest(testId); if (suite.getStartingTest().equals(test.getQName())) { ArrayList<String> kvps = new ArrayList<String>();
masterIndex = Generator.generateXsl(setupOpts); if (indexFile != null) { masterIndex.persist(indexFile); masterIndex = new Index(indexFile); if (masterIndex.outOfDate()) { System.out .println("Warning: Scripts have changed since this session was first executed."); masterIndex = Generator.generateXsl(setupOpts); if (indexFile != null) { masterIndex.persist(indexFile); return; masterIndex = new Index(indexFile); if (masterIndex.outOfDate()) { System.out .println("Warning: Scripts have changed since this session was first executed."); if( masterIndex != null) masterIndex.setElements(null); else masterIndex = new Index(); TEClassLoader cl = new TEClassLoader(findResourcesDirectory(sourceFile)); Engine engine = new Engine(masterIndex, setupOpts.getSourcesName(), cl);
public void reexecute_test(String testPath) throws Exception { Document log = LogUtils.readLog(opts.getLogDir(), testPath); String testId = LogUtils.getTestIdFromLog(log); TestEntry test = index.getTest(testId); net.sf.saxon.s9api.DocumentBuilder builder = engine.getBuilder(); XdmNode paramsNode = LogUtils.getParamsFromLog(builder, log); List<String> profiles = opts.getProfiles(); if (profiles.contains("*")) { for (String profile : index.getProfileKeys()) { try { execute_profile(profile, params, false);
ParserEntry pe = index.getParser(key); Object instance = null; if (pe.isInitialized()) {
for (String profile : index.getProfileKeys()) { try { execute_profile(profile, params, false);
SuiteEntry se = null; if (suiteName == null) { Iterator<String> it = masterIndex.getSuiteKeys().iterator(); if (!it.hasNext()) { throw new Exception("Error: No suites in sources."); se = masterIndex.getSuite(it.next());
public ProfileEntry getProfile(String name) { return (ProfileEntry) getEntry(profileMap, name); }