Package com.eviware.soapui.tools

Examples of com.eviware.soapui.tools.SoapUITestCaseRunner


//      if( !new File( projectFile ).exists() )
//      {
//        throw new MojoExecutionException( "soapui-project-file [" + projectFile + "] is not found or not specified" );
//      }

    SoapUITestCaseRunner runner = new SoapUITestCaseRunner( "SoapUI " + SoapUI.SOAPUI_VERSION
        + " Maven2 TestCase Runner" );
    runner.setProjectFile( projectFile );

    if( endpoint != null )
      runner.setEndpoint( endpoint );

    if( testSuite != null )
      runner.setTestSuite( testSuite );

    if( testCase != null )
      runner.setTestCase( testCase );

    if( username != null )
      runner.setUsername( username );

    if( password != null )
      runner.setPassword( password );

    if( wssPasswordType != null )
      runner.setWssPasswordType( wssPasswordType );

    if( domain != null )
      runner.setDomain( domain );

    if( host != null )
      runner.setHost( host );

    if( outputFolder != null )
      runner.setOutputFolder( outputFolder );

    runner.setPrintReport( printReport );
    runner.setExportAll( exportAll );
    runner.setJUnitReport( junitReport );
    runner.setEnableUI( interactive );
    runner.setIgnoreError( testFailIgnore );
    runner.setSaveAfterRun( saveAfterRun );

    if( settingsFile != null )
      runner.setSettingsFile( settingsFile );

    if( projectPassword != null )
      runner.setProjectPassword( projectPassword );

    if( settingsPassword != null )
      runner.setSoapUISettingsPassword( settingsPassword );

    if( globalProperties != null )
      runner.setGlobalProperties( globalProperties );

    if( projectProperties != null )
      runner.setProjectProperties( projectProperties );

    if( soapuiProperties != null && soapuiProperties.size() > 0 )
      for( Object key : soapuiProperties.keySet() )
      {
        System.out.println( "Setting " + ( String )key + " value " + soapuiProperties.getProperty( ( String )key ) );
        System.setProperty( ( String )key, soapuiProperties.getProperty( ( String )key ) );
      }
   
    try
    {
      runner.run();
    }
    catch( Exception e )
    {
      getLog().error( e.toString() );
      throw new MojoFailureException( this, "SoapUI Test(s) failed", e.getMessage() );
View Full Code Here


        FileTasks.assertFile(soapUiProjectFile);
        FileTasks.assertDirectory(reportingDirectory);
    }

    public void run() {
        SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
        runner.setProjectFile(soapUiProjectFile.toString());
        runner.setJUnitReport(true);// j
        runner.setOutputFolder(reportingDirectory.toString());// f
        runner.setPrintAlertSiteReport(false);
        runner.setIgnoreError(true);
        runner.setExportAll(true);// a

        try {
            runner.run();
        } catch (Exception ignore) {
            LOGGER.error("Exception occured during Test " + reportingDirectory + ". See test results for more information.");
        }

    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.tools.SoapUITestCaseRunner

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.