Ran after the containing test suite is invoked.

@param Suite $suite The test suite after which to run this method
491297
public function afterSuite(Suite $suite)
    {
        $hook = $suite->getHook('after');
        if ($hook && $hook->getException()) {
            $this->handleHookFailure($hook);
        }
    }
1332898
def process(self):
        
        suites = None
        if isinstance(self.tree, ET.Element):
            root = self.tree
        else:
            root = self.tree.getroot()

        if root.tag == "testrun":
            root = root[0]

        if root.tag == "testsuite":
            suites = [root]

        if root.tag == "testsuites":
            suites = [x for x in root]

        assert suites, "could not find test suites in results xml"

        for suite in suites:
            cursuite = Suite()
            self.suites.append(cursuite)
            cursuite.name = suite.attrib["name"]
            if "package" in suite.attrib:
                cursuite.package = suite.attrib["package"]
            cursuite.duration = float(suite.attrib.get("time", '0').replace(',',''))

            for element in suite:
                if element.tag == "error":
                    # top level error?
                    errtag = {
                        "message": element.attrib.get("message", ""),
                        "type": element.attrib.get("type", ""),
                        "text": element.text
                    }
                    cursuite.errors.append(errtag)
                if element.tag == "system-out":
                    cursuite.stdout = element.text
                if element.tag == "system-err":
                    cursuite.stderr = element.text

                if element.tag == "properties":
                    for prop in element:
                        if prop.tag == "property":
                            cursuite.properties[prop.attrib["name"]] = prop.attrib["value"]

                if element.tag == "testcase":
                    testcase = element

                    if not testcase.attrib.get("classname", None):
                        testcase.attrib["classname"] = NO_CLASSNAME

                    if testcase.attrib["classname"] not in cursuite:
                        testclass = Class()
                        testclass.name = testcase.attrib["classname"]
                        cursuite[testclass.name] = testclass

                    testclass = cursuite[testcase.attrib["classname"]]
                    newcase = Case()
                    newcase.name = testcase.attrib["name"]
                    newcase.testclass = testclass
                    newcase.duration = float(testcase.attrib.get("time", '0').replace(',',''))
                    testclass.cases.append(newcase)

                    # does this test case have any children?
                    for child in testcase:
                        if child.tag == "skipped":
                            newcase.skipped = child.text
                            if "message" in child.attrib:
                                newcase.skipped_msg = child.attrib["message"]
                        elif child.tag == "system-out":
                            newcase.stdout = child.text
                        elif child.tag == "system-err":
                            newcase.stderr = child.text
                        elif child.tag == "failure":
                            newcase.failure = child.text
                            if "message" in child.attrib:
                                newcase.failure_msg = child.attrib["message"]
                        elif child.tag == "error":
                            newcase.failure = child.text
                            if "message" in child.attrib:
                                newcase.failure_msg = child.attrib["message"]
                        elif child.tag == "properties":
                            for property in child:
                                newproperty = Property()
                                newproperty.name = property.attrib["name"]
                                newproperty.value = property.attrib["value"]
                                newcase.properties.append(newproperty)
171752
public function addSuite($suite)
    {
        if (true === $this->pending) {
            $suite->setPending();
        }
        $this->suites[] = $suite;
    }
214891
def start
      suite = TestSuite.new
      testruns = @config.files.collect do |file|
        name = file.sub(Dir.pwd+'/','')
        suite.new_case(name, file)
      end
      test_loop_runner(suite)
    end
484499
protected function getAllFilesFromSuite($suite)
    {
        if (!file_exists($suite->testsFullPath)) {
            die('FATAL ERROR: directory not found: '.$suite->testsFullPath.'.');
        }

        $files = Finder::create()->files()->in($suite->testsFullPath);

        if ($suite->file_mask) {
            $files->name($suite->file_mask);
        }

        return iterator_to_array($files, false);
    }
78711
public void setSuites(java.util.Collection<Suite> suites) {
        if (suites == null) {
            this.suites = null;
            return;
        }

        this.suites = new java.util.ArrayList<Suite>(suites);
    }
276866
protected function _blockEnd($runAfterEach = true)
    {
        $type = $this->log()->type();
        foreach ($this->_expectations as $expectation) {
            if (!($logs = $expectation->logs()) && $type !== 'errored') {
                $this->log()->type('pending');
            }
            foreach ($logs as $log) {
                $this->log($log['type'], $log);
            }
        }

        if ($type === 'passed' && empty($this->_expectations)) {
            $this->log()->type('pending');
        }
        $type = $this->log()->type();

        if ($type === 'failed' || $type === 'errored') {
            $this->_passed = false;
            $this->suite()->failure();
        }

        if ($this->_parent && $runAfterEach) {
            try {
                $this->_parent->runCallbacks('afterEach');
            } catch (Exception $exception) {
                $this->_exception($exception, true);
            }
        }

        $this->summary()->log($this->log());

        $this->report('specEnd', $this->log());

        Suite::current()->scope()->clear();
        $this->suite()->autoclear();
    }
485623
@Override
    public void afterPropertiesSet() throws Exception {
        this.transactionTemplate = new TransactionTemplate(this.transactionManager);
        this.transactionTemplate.setPropagationBehavior(
                TransactionTemplate.PROPAGATION_REQUIRES_NEW);
        this.transactionTemplate.setReadOnly(true);
        this.transactionTemplate.afterPropertiesSet();

        this.runDatabaseTests();
        if (LOG.isDebugEnabled()) LOG.debug(this.toString());
    }
119686
public function beforeSuite(Suite $suite)
    {
        $hook = $suite->getHook('before');
        if ($hook && $hook->getException()) {
            $this->handleHookFailure($hook);
        }
    }
837458
public function onSuiteStart(Suite $suite)
    {
        if (! $suite->getDescription()) {
            return;
        }

        $this->message
            ->setTest($suite)
            ->setEvent('suite.start')
            ->write();
    }
214993
public void afterSuite(@Observes AfterSuite event) {
        try {
            log.debug("Starting Citrus after suite lifecycle");
            citrusInstance.get().afterSuite(configurationInstance.get().getSuiteName());

            closeApplicationContext();
        } catch (Exception e) {
            log.error(CitrusExtensionConstants.CITRUS_EXTENSION_ERROR, e);
            throw e;
        }
    }
691584
public function _after(\Codeception\TestInterface $test)
    {
        foreach ($this->permanentServices as $serviceName => $service) {
            $this->permanentServices[$serviceName] = $this->grabService($serviceName);
        }
        parent::_after($test);
    }
686127
function Session(suite) {
	Emitter.call(this);

	// Files containing tests or instructions
	this.files = [];

	// Register the Suite instance
	this.suite = suite;

	// Global (former `ctx`)
	this.global = global;

	// Run tests in this context
	this.context = new Context(this);

	// Start the Mocha engine
	this.engine = new Mocha({
		// invert: true,
		// fullStackTrace: true,
		ignoreLeaks: true,
		useColors: true,
		// useInlineDiffs: true,
		timeout: suite.options.timeout || 10000,
		// growl: true,
		reporter: suite.options.reporter
	});

	// this.engine.grep(null);
	// this.engine.suite = this.engine.suite.clone();
	// this.engine.suite.ctx = new Mocha.Context;

	// Workaroud, `bdd` methods wont be available differently
	this.engine.suite.emit('pre-require', this.global, null, this.engine);

	// me.ctx = options.ctx || global;
	// me.context = new Context();
	// me.parsers = util.extend({}, Picky.parsers, options.parsers);
	// me.library = Picky.feature.library('picky');
	// me.libraries = [me.library];
	// me.queue = [];
}
357550
public function exitOnFailure(AfterScenarioTested $event)
    {
        if (!$this->resultInterpretation->isFailure($event->getTestResult())) {
            return;
        }

        $this->eventDispatcher->dispatch(SuiteTested::AFTER, new AfterSuiteAborted($event->getEnvironment()));
        $this->eventDispatcher->dispatch(ExerciseCompleted::AFTER, new AfterExerciseAborted());

        exit(1);
    }
1221678
public function run()
    {
        // Set the total count to zero
        $this->totalCount = 0;

        // Load the suites defined in the options
        $suites = $this->options->suites;

        // Check if a suite name has been passed via the command line
        if ($suite = $this->options->suite) {
            // If the suite hasn't been defined, throw an exception
            if (!$this->options->suites->{$suite}) {
                throw new TestNotFoundException('The suite '.$suite.' is not defined');
            }

            // Overwrite the array of suites, so that only the passed
            // suite is run
            $suites = [
                $suite => $this->options->suites->{$suite},
            ];
        }

        // If arguments exist, then we create a new suite from the
        // files/directories passed as arguments
        if ($this->args) {
            $suites = [
                'tests' => $this->args,
            ];
        }

        // Loop through each of the suites
        foreach ($suites as $suite => $dirs) {
            // Reset the runner's tests
            $this->tests = [];

            // Load the tests for the suite
            $this->loadTests($dirs);

            // Get the number of tests and increment the total count
            $total = count($this->tests);
            $this->totalCount += $total;

            // Get the suite name
            $name = Str::title($suite);

            // Output a message to the user
            echo "\n";
            echo $this->output->gray->render("Running $total tests in suite $name...");

            // Render the table of tests
            $this->output->table();

            // If the random option is set, shuffle the array of tests
            if ($this->options->random === true) {
                shuffle($this->tests);
            }

            // Loop through each of the tests
            foreach ($this->tests as $test) {
                // Run the test inside a try/catch block so that we can
                // include errors in results without stopping testing
                try {
                    $test->run();
                } catch (Exception $e) {
                    $bits = explode('\\', get_class($e));
                    // Mark the test as errored
                    $test->error(array_pop($bits).': '.$e->getMessage());
                }
            }
        }

        // Output the results to the CLI
        $this->output->results();
    }
1211373
public function afterScenario($event)
    {
        $this->testcaseTimer->stop();
        $code = $event->getTestResult()->getResultCode();
        $testResultString = array(
            TestResult::PASSED    => 'passed',
            TestResult::SKIPPED   => 'skipped',
            TestResult::PENDING   => 'pending',
            TestResult::FAILED    => 'failed',
            TestResult::UNDEFINED => 'undefined',
        );

        $this->testsuiteStats[$code]++;

        $this->currentTestcase->addAttribute('time', \round($this->testcaseTimer->getTime(), 3));
        $this->currentTestcase->addAttribute('status', $testResultString[$code]);
    }
502509
public function endFlushSuite()
    {
        if ($this->flushSuiteLevel === 0) {
            throw new NoFlushSuiteStartedException('No flush suite has been started');
        }

        --$this->flushSuiteLevel;
        $this->flush();
        if ($this->activateLog && $this->showFlushLevel) $this->logFlushLevel();
    }