Package org.apache.maven.surefire.testset

Examples of org.apache.maven.surefire.testset.TestSetFailedException


    private void throwIfSet( String throwError )
        throws TestSetFailedException, ReporterException
    {
        if ( "testSetFailed".equals( throwError ) )
        {
            throw new TestSetFailedException( "Let's fail" );
        }
        if ( "reporterException".equals( throwError ) )
        {
            throw new ReporterException( "Let's fail with a reporterexception", new RuntimeException() );
        }
View Full Code Here


        {
            return Class.forName( className );
        }
        catch ( Exception ex )
        {
            throw new TestSetFailedException( "Cannot find listener class " + className, ex );
        }
    }
View Full Code Here

            for ( Failure failure : run.getFailures() )
            {
                if ( isFailureInsideJUnitItself( failure ) )
                {
                    final Throwable exception = failure.getException();
                    throw new TestSetFailedException( exception );
                }
            }
        }
    }
View Full Code Here

        }

        String timeoutMessage = computerWrapper.describeElapsedTimeout();
        if ( timeoutMessage.length() != 0 )
        {
            throw new TestSetFailedException( timeoutMessage );
        }
    }
View Full Code Here

                    }
                    return executedTests;
                }
                catch ( Exception e )
                {
                    throw new TestSetFailedException( e );
                }
            }
            return Collections.emptySet();
        }
View Full Code Here

            Method method = clazz.getMethod( "setMethodName", new Class[] { String.class } );
            method.invoke( null, methodNamePattern );
        }
        catch ( ClassNotFoundException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( SecurityException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( NoSuchMethodException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( IllegalArgumentException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( IllegalAccessException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( InvocationTargetException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }

        XmlMethodSelector xms = new XmlMethodSelector();

        xms.setName( clazzName );
View Full Code Here

            Method method = clazz.getMethod( "setGroups", new Class[] { String.class, String.class } );
            method.invoke( null, groups, excludedGroups );
        }
        catch ( ClassNotFoundException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( SecurityException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( NoSuchMethodException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( IllegalArgumentException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( IllegalAccessException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }
        catch ( InvocationTargetException e )
        {
            throw new TestSetFailedException( e.getMessage(), e );
        }

        XmlMethodSelector xms = new XmlMethodSelector();

        xms.setName( clazzName );
View Full Code Here

            runMethod.invoke( testObject, runParams );
        }
        catch ( IllegalArgumentException e )
        {
            throw new TestSetFailedException( testClass.getName(), e );
        }
        catch ( InstantiationException e )
        {
            throw new TestSetFailedException( testClass.getName(), e );
        }
        catch ( IllegalAccessException e )
        {
            throw new TestSetFailedException( testClass.getName(), e );
        }
        catch ( InvocationTargetException e )
        {
            throw new TestSetFailedException( testClass.getName(), e.getTargetException() );
        }
        catch ( NoSuchMethodException e )
        {
            throw new TestSetFailedException( "Class is not a JUnit TestCase", e );
        }
    }
View Full Code Here

        }
        TestNGTestSet testSet = testSets.get( testSetName );

        if ( testSet == null )
        {
            throw new TestSetFailedException( "Unable to find test set '" + testSetName + "' in suite" );
        }

        RunListener reporter = reporterManagerFactory.createReporter();
        ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );
View Full Code Here

        {
            TestNGTestSet testSet = new TestNGTestSet( testClass );

            if ( testSets.containsKey( testSet.getName() ) )
            {
                throw new TestSetFailedException( "Duplicate test set '" + testSet.getName() + "'" );
            }
            testSets.put( testSet.getName(), testSet );

        }
View Full Code Here

TOP

Related Classes of org.apache.maven.surefire.testset.TestSetFailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.