Java Code Examples for org.junit.runner.Runner#getDescription()
The following examples show how to use
org.junit.runner.Runner#getDescription() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractMultiTestRunner.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void initExecutions() { if (executions.isEmpty()) { try { Runner descriptionProvider = createRunnerFor(Arrays.asList(target), Collections.<Filter>emptyList()); templateDescription = descriptionProvider.getDescription(); } catch (InitializationError initializationError) { throw UncheckedException.throwAsUncheckedException(initializationError); } createExecutions(); for (Execution execution : executions) { execution.init(target, templateDescription); } } }
Example 2
Source File: IgnoredTestDescriptorProvider.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
List<Description> getAllDescriptions(Description description, String className) { final AllExceptIgnoredTestRunnerBuilder allExceptIgnoredTestRunnerBuilder = new AllExceptIgnoredTestRunnerBuilder(); try { final Class<?> testClass = description.getClass().getClassLoader().loadClass(className); Runner runner = allExceptIgnoredTestRunnerBuilder.runnerForClass(testClass); if (runner == null) { //fall back to default runner runner = Request.aClass(testClass).getRunner(); } final Description runnerDescription = runner.getDescription(); return runnerDescription.getChildren(); } catch (Throwable throwable) { throw new TestSuiteExecutionException(String.format("Unable to process Ignored class %s.", className), throwable); } }
Example 3
Source File: AbstractMultiTestRunner.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void initExecutions() { if (executions.isEmpty()) { try { Runner descriptionProvider = createRunnerFor(Arrays.asList(target), Collections.<Filter>emptyList()); templateDescription = descriptionProvider.getDescription(); } catch (InitializationError initializationError) { throw UncheckedException.throwAsUncheckedException(initializationError); } createExecutions(); for (Execution execution : executions) { execution.init(target, templateDescription); } } }
Example 4
Source File: IgnoredTestDescriptorProvider.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
List<Description> getAllDescriptions(Description description, String className) { final AllExceptIgnoredTestRunnerBuilder allExceptIgnoredTestRunnerBuilder = new AllExceptIgnoredTestRunnerBuilder(); try { final Class<?> testClass = description.getClass().getClassLoader().loadClass(className); Runner runner = allExceptIgnoredTestRunnerBuilder.runnerForClass(testClass); if (runner == null) { //fall back to default runner runner = Request.aClass(testClass).getRunner(); } final Description runnerDescription = runner.getDescription(); return runnerDescription.getChildren(); } catch (Throwable throwable) { throw new TestSuiteExecutionException(String.format("Unable to process Ignored class %s.", className), throwable); } }
Example 5
Source File: HybrisJUnitIntegrationTestLoader.java From hybris-commerce-eclipse-plugin with Apache License 2.0 | 5 votes |
private Description getRootDescription(Runner runner, DescriptionMatcher matcher) { Description current= runner.getDescription(); while (true) { List<Description> children= current.getChildren(); if (children.size() != 1 || matcher.matches(current)) return current; current= children.get(0); } }
Example 6
Source File: AbstractMultiTestRunner.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void initExecutions() { if (executions.isEmpty()) { try { Runner descriptionProvider = createRunnerFor(Arrays.asList(target), Collections.<Filter>emptyList()); templateDescription = descriptionProvider.getDescription(); } catch (InitializationError initializationError) { throw UncheckedException.throwAsUncheckedException(initializationError); } createExecutions(); for (Execution execution : executions) { execution.init(target, templateDescription); } } }
Example 7
Source File: IgnoredTestDescriptorProvider.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
List<Description> getAllDescriptions(Description description, String className) { final AllExceptIgnoredTestRunnerBuilder allExceptIgnoredTestRunnerBuilder = new AllExceptIgnoredTestRunnerBuilder(); try { final Class<?> testClass = description.getClass().getClassLoader().loadClass(className); Runner runner = allExceptIgnoredTestRunnerBuilder.runnerForClass(testClass); if (runner == null) { //fall back to default runner runner = Request.aClass(testClass).getRunner(); } final Description runnerDescription = runner.getDescription(); return runnerDescription.getChildren(); } catch (Throwable throwable) { throw new TestSuiteExecutionException(String.format("Unable to process Ignored class %s.", className), throwable); } }
Example 8
Source File: AbstractMultiTestRunner.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void initExecutions() { if (executions.isEmpty()) { try { Runner descriptionProvider = createRunnerFor(Arrays.asList(target), Collections.<Filter>emptyList()); templateDescription = descriptionProvider.getDescription(); } catch (InitializationError initializationError) { throw UncheckedException.throwAsUncheckedException(initializationError); } createExecutions(); for (Execution execution : executions) { execution.init(target, templateDescription); } } }
Example 9
Source File: IgnoredTestDescriptorProvider.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
List<Description> getAllDescriptions(Description description, String className) { final AllExceptIgnoredTestRunnerBuilder allExceptIgnoredTestRunnerBuilder = new AllExceptIgnoredTestRunnerBuilder(); try { final Class<?> testClass = description.getClass().getClassLoader().loadClass(className); Runner runner = allExceptIgnoredTestRunnerBuilder.runnerForClass(testClass); if (runner == null) { //fall back to default runner runner = Request.aClass(testClass).getRunner(); } final Description runnerDescription = runner.getDescription(); return runnerDescription.getChildren(); } catch (Throwable throwable) { throw new TestSuiteExecutionException(String.format("Unable to process Ignored class %s.", className), throwable); } }
Example 10
Source File: SmokeTestSuite.java From firebase-android-sdk with Apache License 2.0 | 4 votes |
@Override protected Description describeChild(Runner runner) { return runner.getDescription(); }
Example 11
Source File: AllScenariosRunner.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Override protected Description describeChild(Runner child) { return child.getDescription(); }
Example 12
Source File: HybrisJUnitIntegrationTestLoader.java From hybris-commerce-eclipse-plugin with Apache License 2.0 | 4 votes |
private ITestReference createUnfilteredTest(Class<?> clazz, String[] failureNames) { Request request= sortByFailures(Request.aClass(clazz), failureNames); Runner runner= request.getRunner(); Description description= runner.getDescription(); return new HybrisJUnitTestReference(runner, description); }
Example 13
Source File: AllScenariosRunner.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override protected Description describeChild(Runner child) { return child.getDescription(); }
Example 14
Source File: JunitSuiteRunner.java From lambda-behave with MIT License | 4 votes |
@Override protected org.junit.runner.Description describeChild(Runner child) { return child.getDescription(); }
Example 15
Source File: JavaScriptTestSuite.java From selenium with Apache License 2.0 | 4 votes |
@Override protected Description describeChild(Runner child) { return child.getDescription(); }
Example 16
Source File: MetamorphTestSuite.java From metafacture-core with Apache License 2.0 | 4 votes |
@Override protected Description describeChild(final Runner child) { return child.getDescription(); }