protected String makeOutputPath( String path ) { if( path.startsWith( "/" ) ) return getOutputPath() + path; return getOutputPath() + "/" + path; }
@Override protected String[] getOutputPathElements() { return new String[]{getTestOutputRoot(), getPlatformName(), getTestCaseName(), getTestName()}; }
@Override protected String[] getPlanPathElements() { return new String[]{getTestPlanRoot(), getPlatformName(), getTestCaseName(), getTestName()}; }
protected void copyFromLocal( String inputFile ) throws IOException { getPlatform().copyFromLocal( inputFile ); }
@Override protected Object createTest() throws Exception { PlatformTestCase testCase = (PlatformTestCase) super.createTest(); testCase.installPlatform( testPlatform ); return testCase; } };
protected Map<Object, Object> disableDebug() { Map<Object, Object> properties = getProperties(); FlowConnectorProps.setDebugLevel( properties, DebugLevel.NONE ); return properties; }
public String getOutputPath( String path ) { String result = makeOutputPath( path ); if( allPaths.contains( result ) ) throw new IllegalStateException( "path already has been used:" + result ); allPaths.add( result ); currentPaths.add( result ); return result; }
public Map<Object, Object> getProperties() { return new HashMap<Object, Object>( getPlatform().getProperties() ); }
@Override protected Object createTest() throws Exception { PlatformTestCase testCase = (PlatformTestCase) super.createTest(); testCase.installPlatform( testPlatform ); return testCase; } };
protected Map<Object, Object> disableDebug() { Map<Object, Object> properties = getProperties(); FlowConnectorProps.setDebugLevel( properties, DebugLevel.NONE ); return properties; }
public String getOutputPath( String path ) { String result = makeOutputPath( path ); if( allPaths.contains( result ) ) throw new IllegalStateException( "path already has been used:" + result ); allPaths.add( result ); currentPaths.add( result ); return result; }
@Override protected String[] getOutputPathElements() { return new String[]{getTestOutputRoot(), getPlatformName(), getTestCaseName(), getTestName()}; }
@Override protected String[] getPlanPathElements() { return new String[]{getTestPlanRoot(), getPlatformName(), getTestCaseName(), getTestName()}; }
protected String makeOutputPath( String path ) { if( path.startsWith( "/" ) ) return getOutputPath() + path; return getOutputPath() + "/" + path; }
public Map<Object, Object> getProperties() { return new HashMap<Object, Object>( getPlatform().getProperties() ); }
public static void makeSuites( TestPlatform testPlatform, Properties properties, Map<String, Pipe> pipes, TestSuite suite, Class type ) throws IllegalAccessException, InvocationTargetException, InstantiationException, IOException, ClassNotFoundException { for( String name : pipes.keySet() ) { if( isUNDEFINED( properties, name ) ) { LOG.debug( "skipping: {}", name ); continue; } // TestPlatform testPlatform = makeInstance( getPlatformClass( type.getClassLoader() ) ); // test platform dependencies not installed, so skip // if( testPlatform == null ) // continue; String platformName = testPlatform.getName(); String displayName = String.format( "%s[%s]", name, platformName ); PlatformTestCase platformTest = (PlatformTestCase) type.getConstructors()[ 0 ].newInstance( properties, displayName, name, pipes.get( name ) ); platformTest.installPlatform( testPlatform ); suite.addTest( platformTest ); } }
@Override protected String getOutputPath() { return new File( super.getOutputPath() ).getAbsolutePath() + "/"; }
protected void copyFromLocal( String inputFile ) throws IOException { getPlatform().copyFromLocal( inputFile ); }
public static void makeSuites( TestPlatform testPlatform, Properties properties, Map<String, Pipe> pipes, TestSuite suite, Class type ) throws IllegalAccessException, InvocationTargetException, InstantiationException, IOException, ClassNotFoundException { for( String name : pipes.keySet() ) { if( isUNDEFINED( properties, name ) ) { LOG.debug( "skipping: {}", name ); continue; } // TestPlatform testPlatform = makeInstance( getPlatformClass( type.getClassLoader() ) ); // test platform dependencies not installed, so skip // if( testPlatform == null ) // continue; String platformName = testPlatform.getName(); String displayName = String.format( "%s[%s]", name, platformName ); PlatformTestCase platformTest = (PlatformTestCase) type.getConstructors()[ 0 ].newInstance( properties, displayName, name, pipes.get( name ) ); platformTest.installPlatform( testPlatform ); suite.addTest( platformTest ); } }
@Override public String getOutputPath( String path ) { return new File( super.getOutputPath( path ) ).getAbsolutePath() + "/"; }