diff --git a/CHANGELOG.md b/CHANGELOG.md index f0a4f817..0a9db9b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Added -- Update dependency io.cucumber:messages to v29 ([#101](https://github.com/cucumber/query/pull/101)) +- Update dependency `io.cucumber:messages` up to v29 ([#101](https://github.com/cucumber/query/pull/101)) - Added more queries to find messages by `TestCaseFinished` and `TestStepFinished` ([#77](https://github.com/cucumber/query/pull/77)) +### Deprecated +- Deprecated various lineage derived methods ([#84](https://github.com/cucumber/query/pull/84)) + ## [13.6.0] - 2025-08-11 ### Changed - [Java] Replace redundant concurrent hashmap with regular hashmap ([#89](https://github.com/cucumber/query/pull/89)) diff --git a/java/src/main/java/io/cucumber/query/Query.java b/java/src/main/java/io/cucumber/query/Query.java index 7d1ba091..e6a8dad2 100644 --- a/java/src/main/java/io/cucumber/query/Query.java +++ b/java/src/main/java/io/cucumber/query/Query.java @@ -41,8 +41,8 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Objects; import java.util.Optional; +import java.util.Objects; import java.util.function.BiFunction; import java.util.function.Supplier; import java.util.stream.Collectors; @@ -128,6 +128,10 @@ public List findAllTestCaseFinished() { .collect(toList()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public Map, List> findAllTestCaseStartedGroupedByFeature() { return findAllTestCaseStarted() .stream() @@ -176,6 +180,10 @@ public List findAttachmentsBy(TestStepFinished testStepFinished) { .collect(toList()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public Optional findFeatureBy(TestCaseStarted testCaseStarted) { return findLineageBy(testCaseStarted).flatMap(Lineage::feature); } @@ -204,6 +212,10 @@ public Optional findMostSevereTestStepResultBy(TestCaseFinished .flatMap(this::findMostSevereTestStepResultBy); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(GherkinDocument element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); @@ -212,6 +224,10 @@ public String findNameOf(GherkinDocument element, NamingStrategy namingStrategy) .orElseThrow(createElementWasNotPartOfThisQueryObject()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(Feature element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); @@ -220,6 +236,10 @@ public String findNameOf(Feature element, NamingStrategy namingStrategy) { .orElseThrow(createElementWasNotPartOfThisQueryObject()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(Rule element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); @@ -228,6 +248,10 @@ public String findNameOf(Rule element, NamingStrategy namingStrategy) { .orElseThrow(createElementWasNotPartOfThisQueryObject()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(Scenario element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); @@ -236,6 +260,10 @@ public String findNameOf(Scenario element, NamingStrategy namingStrategy) { .orElseThrow(createElementWasNotPartOfThisQueryObject()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(Examples element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); @@ -244,6 +272,10 @@ public String findNameOf(Examples element, NamingStrategy namingStrategy) { .orElseThrow(createElementWasNotPartOfThisQueryObject()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(TableRow element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); @@ -252,6 +284,10 @@ public String findNameOf(TableRow element, NamingStrategy namingStrategy) { .orElseThrow(createElementWasNotPartOfThisQueryObject()); } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ + @Deprecated public String findNameOf(Pickle element, NamingStrategy namingStrategy) { requireNonNull(element); requireNonNull(namingStrategy); diff --git a/java/src/test/java/io/cucumber/query/NamingStrategyAcceptanceTest.java b/java/src/test/java/io/cucumber/query/NamingStrategyAcceptanceTest.java new file mode 100644 index 00000000..2d304c01 --- /dev/null +++ b/java/src/test/java/io/cucumber/query/NamingStrategyAcceptanceTest.java @@ -0,0 +1,128 @@ +package io.cucumber.query; + +import io.cucumber.messages.NdjsonToMessageIterable; +import io.cucumber.messages.types.Envelope; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.BufferedWriter; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import static io.cucumber.query.Jackson.OBJECT_MAPPER; +import static io.cucumber.query.NamingStrategy.ExampleName.NUMBER_AND_PICKLE_IF_PARAMETERIZED; +import static io.cucumber.query.NamingStrategy.ExampleName.PICKLE; +import static io.cucumber.query.NamingStrategy.FeatureName.EXCLUDE; +import static io.cucumber.query.NamingStrategy.Strategy.LONG; +import static io.cucumber.query.NamingStrategy.Strategy.SHORT; +import static java.nio.charset.StandardCharsets.UTF_8; +import static java.nio.file.Files.newOutputStream; +import static java.nio.file.Files.readAllBytes; +import static org.assertj.core.api.Assertions.assertThat; + +public class NamingStrategyAcceptanceTest { + private static final NdjsonToMessageIterable.Deserializer deserializer = (json) -> OBJECT_MAPPER.readValue(json, Envelope.class); + + static List acceptance() { + Map strategies = new LinkedHashMap<>(); + strategies.put("long", NamingStrategy.strategy(LONG).build()); + strategies.put("long-exclude-feature-name", NamingStrategy.strategy(LONG).featureName(EXCLUDE).build()); + strategies.put("long-with-pickle-name", NamingStrategy.strategy(LONG).exampleName(PICKLE).build()); + strategies.put("long-with-pickle-name-if-parameterized", NamingStrategy.strategy(LONG).exampleName(NUMBER_AND_PICKLE_IF_PARAMETERIZED).build()); + strategies.put("short", NamingStrategy.strategy(SHORT).build()); + + List sources = Arrays.asList( + Paths.get("../testdata/src/minimal.ndjson"), + Paths.get("../testdata/src/rules.ndjson"), + Paths.get("../testdata/src/examples-tables.ndjson") + ); + + List testCases = new ArrayList<>(); + sources.forEach(path -> + strategies.forEach((strategyName, strategy) -> + testCases.add(new TestCase(path, strategyName, strategy)))); + + return testCases; + } + + private static String writeResults(TestCase testCase, NamingStrategy strategy) throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + writeResults(strategy, testCase, out); + return new String(out.toByteArray(), UTF_8); + } + + private static void writeResults(NamingStrategy strategy, TestCase testCase, OutputStream out) throws IOException { + try (InputStream in = Files.newInputStream(testCase.source)) { + try (NdjsonToMessageIterable envelopes = new NdjsonToMessageIterable(in, deserializer)) { + try (PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out)))) { + Query query = new Query(); + for (Envelope envelope : envelopes) { + query.update(envelope); + } + query.findAllPickles().forEach(pickle -> { + query.findLineageBy(pickle) + .map(lineage -> strategy.reduce(lineage, pickle)) + .ifPresent(writer::println); + }); + } + + } + } + } + + @ParameterizedTest + @MethodSource("acceptance") + void test(TestCase testCase) throws IOException { + String actual = writeResults(testCase, testCase.strategy); + String expected = new String(readAllBytes(testCase.expected), UTF_8); + assertThat(actual).isEqualTo(expected); + } + + @ParameterizedTest + @MethodSource("acceptance") + @Disabled + void updateExpectedQueryResultFiles(TestCase testCase) throws IOException { + try (OutputStream out = newOutputStream(testCase.expected)) { + writeResults(testCase.strategy, testCase, out); + } + } + + static class TestCase { + private final Path source; + private final NamingStrategy strategy; + private final Path expected; + + private final String name; + private final String strategyName; + + TestCase(Path source, String strategyName, NamingStrategy strategy) { + this.source = source; + this.strategy = strategy; + this.strategyName = strategyName; + String fileName = source.getFileName().toString(); + this.name = fileName.substring(0, fileName.lastIndexOf(".ndjson")); + this.expected = source.getParent().resolve(name + ".naming-strategy." + strategyName + ".txt"); + } + + @Override + public String toString() { + return name + " -> " + strategyName; + } + + } + +} diff --git a/java/src/test/java/io/cucumber/query/QueryAcceptanceTest.java b/java/src/test/java/io/cucumber/query/QueryAcceptanceTest.java index 2803b6fb..20c593c0 100644 --- a/java/src/test/java/io/cucumber/query/QueryAcceptanceTest.java +++ b/java/src/test/java/io/cucumber/query/QueryAcceptanceTest.java @@ -4,7 +4,6 @@ import io.cucumber.messages.Convertor; import io.cucumber.messages.NdjsonToMessageIterable; import io.cucumber.messages.types.Envelope; -import io.cucumber.messages.types.Feature; import io.cucumber.messages.types.Hook; import io.cucumber.messages.types.Pickle; import io.cucumber.messages.types.PickleStep; @@ -38,10 +37,6 @@ import static com.fasterxml.jackson.core.util.DefaultIndenter.SYSTEM_LINEFEED_INSTANCE; import static io.cucumber.query.Jackson.OBJECT_MAPPER; -import static io.cucumber.query.NamingStrategy.ExampleName.PICKLE; -import static io.cucumber.query.NamingStrategy.FeatureName.EXCLUDE; -import static io.cucumber.query.NamingStrategy.Strategy.LONG; -import static io.cucumber.query.NamingStrategy.Strategy.SHORT; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Arrays.asList; import static java.util.stream.Collectors.toList; @@ -121,12 +116,6 @@ static Map> createQueries() { queries.put("findAllTestSteps", (query) -> query.findAllTestSteps().size()); queries.put("findAllTestStepsStarted", (query) -> query.findAllTestStepsStarted().size()); queries.put("findAllTestStepsFinished", (query) -> query.findAllTestStepsFinished().size()); - queries.put("findAllTestCaseStartedGroupedByFeature", (query) -> query.findAllTestCaseStartedGroupedByFeature() - .entrySet() - .stream() - .map(entry -> Arrays.asList(entry.getKey().map(Feature::getName), entry.getValue().stream() - .map(TestCaseStarted::getId) - .collect(toList())))); queries.put("findAllTestCases", (query) -> query.findAllTestCases().size()); queries.put("findAttachmentsBy", (query) -> query.findAllTestCaseStarted().stream() .map(query::findTestStepFinishedAndTestStepBy) @@ -141,10 +130,6 @@ static Map> createQueries() { attachment.getContentEncoding() )) .collect(toList())); - queries.put("findFeatureBy", (query) -> query.findAllTestCaseStarted().stream() - .map(query::findFeatureBy) - .map(feature -> feature.map(Feature::getName)) - .collect(toList())); queries.put("findHookBy", (query) -> query.findAllTestSteps().stream() .map(query::findHookBy) .map(hook -> hook.map(Hook::getId)) @@ -173,27 +158,6 @@ static Map> createQueries() { return results; }); - queries.put("findNameOf", (query) -> { - Map results = new LinkedHashMap<>(); - results.put("long", query.findAllPickles().stream() - .map(pickle -> query.findNameOf(pickle, NamingStrategy.strategy(LONG).build())) - .collect(toList())); - results.put("excludeFeatureName", query.findAllPickles().stream() - .map(pickle -> query.findNameOf(pickle, NamingStrategy.strategy(LONG).featureName(EXCLUDE).build())) - .collect(toList())); - results.put("longPickleName", query.findAllPickles().stream() - .map(pickle -> query.findNameOf(pickle, NamingStrategy.strategy(LONG).exampleName(PICKLE).build())) - .collect(toList())); - results.put("short", query.findAllPickles().stream() - .map(pickle -> query.findNameOf(pickle, NamingStrategy.strategy(SHORT).build())) - .collect(toList())); - results.put("shortPickleName", query.findAllPickles().stream() - .map(pickle -> query.findNameOf(pickle, NamingStrategy.strategy(SHORT).exampleName(PICKLE).build())) - .collect(toList())); - - return results; - }); - queries.put("findPickleBy", (query) -> { Map results = new LinkedHashMap<>(); results.put("testCaseStarted", query.findAllTestCaseStarted().stream() diff --git a/javascript/src/Query.ts b/javascript/src/Query.ts index f2e887ab..52a87aef 100644 --- a/javascript/src/Query.ts +++ b/javascript/src/Query.ts @@ -464,6 +464,9 @@ export default class Query { ) } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ public findAllTestCaseStartedGroupedByFeature(): Map< Feature | undefined, ReadonlyArray @@ -498,6 +501,9 @@ export default class Query { .filter((attachment) => attachment.testStepId === testStepFinished.testStepId) } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ public findFeatureBy(testCaseStarted: TestCaseStarted): Feature | undefined { return this.findLineageBy(testCaseStarted)?.feature } @@ -526,6 +532,9 @@ export default class Query { ).at(-1) } + /** + * @deprecated {@link #findLineageBy} is public, this method can be inlined. + */ public findNameOf(pickle: Pickle, namingStrategy: NamingStrategy): string { const lineage = this.findLineageBy(pickle) return lineage ? namingStrategy.reduce(lineage, pickle) : pickle.name diff --git a/javascript/src/acceptance.spec.ts b/javascript/src/acceptance.spec.ts index e378bcc1..ed6b51c3 100644 --- a/javascript/src/acceptance.spec.ts +++ b/javascript/src/acceptance.spec.ts @@ -8,12 +8,6 @@ import util from 'node:util' import { NdjsonToMessageStream } from '@cucumber/message-streams' import { Envelope } from '@cucumber/messages' -import { - namingStrategy, - NamingStrategyExampleName, - NamingStrategyFeatureName, - NamingStrategyLength, -} from './Lineage' import Query from './Query' const asyncPipeline = util.promisify(pipeline) @@ -35,13 +29,6 @@ describe('Acceptance Tests', async () => { findAllPickleSteps: (query: Query) => query.findAllPickleSteps().length, findAllTestCaseStarted: (query: Query) => query.findAllTestCaseStarted().length, findAllTestSteps: (query: Query) => query.findAllTestSteps().length, - findAllTestCaseStartedGroupedByFeature: (query: Query) => - [...query.findAllTestCaseStartedGroupedByFeature().entries()].map( - ([feature, testCaseStarteds]) => [ - feature.name, - testCaseStarteds.map((testCaseStarted) => testCaseStarted.id), - ] - ), findAttachmentsBy: (query: Query) => query .findAllTestCaseStarted() @@ -56,11 +43,6 @@ describe('Acceptance Tests', async () => { attachment.mediaType, attachment.contentEncoding, ]), - findFeatureBy: (query: Query) => - query - .findAllTestCaseStarted() - .map((testCaseStarted) => query.findFeatureBy(testCaseStarted)) - .map((feature) => feature?.name), findHookBy: (query: Query) => query .findAllTestSteps() @@ -82,48 +64,6 @@ describe('Acceptance Tests', async () => { .filter((value) => value), } }, - findNameOf: (query: Query) => { - return { - long: query - .findAllPickles() - .map((pickle) => query.findNameOf(pickle, namingStrategy(NamingStrategyLength.LONG))), - excludeFeatureName: query - .findAllPickles() - .map((pickle) => - query.findNameOf( - pickle, - namingStrategy(NamingStrategyLength.LONG, NamingStrategyFeatureName.EXCLUDE) - ) - ), - longPickleName: query - .findAllPickles() - .map((pickle) => - query.findNameOf( - pickle, - namingStrategy( - NamingStrategyLength.LONG, - NamingStrategyFeatureName.INCLUDE, - NamingStrategyExampleName.PICKLE - ) - ) - ), - short: query - .findAllPickles() - .map((pickle) => query.findNameOf(pickle, namingStrategy(NamingStrategyLength.SHORT))), - shortPickleName: query - .findAllPickles() - .map((pickle) => - query.findNameOf( - pickle, - namingStrategy( - NamingStrategyLength.SHORT, - NamingStrategyFeatureName.INCLUDE, - NamingStrategyExampleName.PICKLE - ) - ) - ), - } - }, findLocationOf: (query: Query) => query.findAllPickles().map((pickle) => query.findLocationOf(pickle)), findPickleBy: (query: Query) => { diff --git a/testdata/src/attachments.findAllTestCaseStartedGroupedByFeature.results.json b/testdata/src/attachments.findAllTestCaseStartedGroupedByFeature.results.json deleted file mode 100644 index 42612d4d..00000000 --- a/testdata/src/attachments.findAllTestCaseStartedGroupedByFeature.results.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - [ - "Attachments", - [ - "50", - "51", - "52", - "53", - "54", - "55", - "56" - ] - ] -] \ No newline at end of file diff --git a/testdata/src/attachments.findFeatureBy.results.json b/testdata/src/attachments.findFeatureBy.results.json deleted file mode 100644 index 1aabcab0..00000000 --- a/testdata/src/attachments.findFeatureBy.results.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "Attachments", - "Attachments", - "Attachments", - "Attachments", - "Attachments", - "Attachments", - "Attachments" -] \ No newline at end of file diff --git a/testdata/src/attachments.findNameOf.results.json b/testdata/src/attachments.findNameOf.results.json deleted file mode 100644 index 875ac2ab..00000000 --- a/testdata/src/attachments.findNameOf.results.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "long" : [ - "Attachments - Strings can be attached with a media type", - "Attachments - Log text", - "Attachments - Log ANSI coloured text", - "Attachments - Log JSON", - "Attachments - Byte arrays are base64-encoded regardless of media type", - "Attachments - Attaching PDFs with a different filename", - "Attachments - Attaching URIs" - ], - "excludeFeatureName" : [ - "Strings can be attached with a media type", - "Log text", - "Log ANSI coloured text", - "Log JSON", - "Byte arrays are base64-encoded regardless of media type", - "Attaching PDFs with a different filename", - "Attaching URIs" - ], - "longPickleName" : [ - "Attachments - Strings can be attached with a media type", - "Attachments - Log text", - "Attachments - Log ANSI coloured text", - "Attachments - Log JSON", - "Attachments - Byte arrays are base64-encoded regardless of media type", - "Attachments - Attaching PDFs with a different filename", - "Attachments - Attaching URIs" - ], - "short" : [ - "Strings can be attached with a media type", - "Log text", - "Log ANSI coloured text", - "Log JSON", - "Byte arrays are base64-encoded regardless of media type", - "Attaching PDFs with a different filename", - "Attaching URIs" - ], - "shortPickleName" : [ - "Strings can be attached with a media type", - "Log text", - "Log ANSI coloured text", - "Log JSON", - "Byte arrays are base64-encoded regardless of media type", - "Attaching PDFs with a different filename", - "Attaching URIs" - ] -} \ No newline at end of file diff --git a/testdata/src/empty.findAllTestCaseStartedGroupedByFeature.results.json b/testdata/src/empty.findAllTestCaseStartedGroupedByFeature.results.json deleted file mode 100644 index e0dc9bc3..00000000 --- a/testdata/src/empty.findAllTestCaseStartedGroupedByFeature.results.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - [ - "Empty Scenarios", - [ - "4" - ] - ] -] \ No newline at end of file diff --git a/testdata/src/empty.findFeatureBy.results.json b/testdata/src/empty.findFeatureBy.results.json deleted file mode 100644 index da349d1a..00000000 --- a/testdata/src/empty.findFeatureBy.results.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "Empty Scenarios" -] \ No newline at end of file diff --git a/testdata/src/empty.findNameOf.results.json b/testdata/src/empty.findNameOf.results.json deleted file mode 100644 index 29820a72..00000000 --- a/testdata/src/empty.findNameOf.results.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "long" : [ - "Empty Scenarios - Blank Scenario" - ], - "excludeFeatureName" : [ - "Blank Scenario" - ], - "longPickleName" : [ - "Empty Scenarios - Blank Scenario" - ], - "short" : [ - "Blank Scenario" - ], - "shortPickleName" : [ - "Blank Scenario" - ] -} \ No newline at end of file diff --git a/testdata/src/examples-tables.findAllTestCaseStartedGroupedByFeature.results.json b/testdata/src/examples-tables.findAllTestCaseStartedGroupedByFeature.results.json deleted file mode 100644 index 7c8958d4..00000000 --- a/testdata/src/examples-tables.findAllTestCaseStartedGroupedByFeature.results.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - [ - "Examples Tables", - [ - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114" - ] - ] -] \ No newline at end of file diff --git a/testdata/src/examples-tables.findFeatureBy.results.json b/testdata/src/examples-tables.findFeatureBy.results.json deleted file mode 100644 index ecc3d986..00000000 --- a/testdata/src/examples-tables.findFeatureBy.results.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - "Examples Tables", - "Examples Tables", - "Examples Tables", - "Examples Tables", - "Examples Tables", - "Examples Tables", - "Examples Tables", - "Examples Tables", - "Examples Tables" -] \ No newline at end of file diff --git a/testdata/src/examples-tables.findNameOf.results.json b/testdata/src/examples-tables.findNameOf.results.json deleted file mode 100644 index f73ebf7f..00000000 --- a/testdata/src/examples-tables.findNameOf.results.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "long" : [ - "Examples Tables - Eating cucumbers - These are passing - #1.1", - "Examples Tables - Eating cucumbers - These are passing - #1.2", - "Examples Tables - Eating cucumbers - These are failing - #2.1", - "Examples Tables - Eating cucumbers - These are failing - #2.2", - "Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - #3.1", - "Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - #3.2", - "Examples Tables - Eating cucumbers with friends - #1.1: Eating cucumbers with 11 friends", - "Examples Tables - Eating cucumbers with friends - #1.2: Eating cucumbers with 1 friends", - "Examples Tables - Eating cucumbers with friends - #1.3: Eating cucumbers with 0 friends" - ], - "excludeFeatureName" : [ - "Eating cucumbers - These are passing - #1.1", - "Eating cucumbers - These are passing - #1.2", - "Eating cucumbers - These are failing - #2.1", - "Eating cucumbers - These are failing - #2.2", - "Eating cucumbers - These are undefined because the value is not an {int} - #3.1", - "Eating cucumbers - These are undefined because the value is not an {int} - #3.2", - "Eating cucumbers with friends - #1.1: Eating cucumbers with 11 friends", - "Eating cucumbers with friends - #1.2: Eating cucumbers with 1 friends", - "Eating cucumbers with friends - #1.3: Eating cucumbers with 0 friends" - ], - "longPickleName" : [ - "Examples Tables - Eating cucumbers - These are passing - Eating cucumbers", - "Examples Tables - Eating cucumbers - These are passing - Eating cucumbers", - "Examples Tables - Eating cucumbers - These are failing - Eating cucumbers", - "Examples Tables - Eating cucumbers - These are failing - Eating cucumbers", - "Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - Eating cucumbers", - "Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - Eating cucumbers", - "Examples Tables - Eating cucumbers with friends - Eating cucumbers with 11 friends", - "Examples Tables - Eating cucumbers with friends - Eating cucumbers with 1 friends", - "Examples Tables - Eating cucumbers with friends - Eating cucumbers with 0 friends" - ], - "short" : [ - "#1.1", - "#1.2", - "#2.1", - "#2.2", - "#3.1", - "#3.2", - "#1.1: Eating cucumbers with 11 friends", - "#1.2: Eating cucumbers with 1 friends", - "#1.3: Eating cucumbers with 0 friends" - ], - "shortPickleName" : [ - "Eating cucumbers", - "Eating cucumbers", - "Eating cucumbers", - "Eating cucumbers", - "Eating cucumbers", - "Eating cucumbers", - "Eating cucumbers with 11 friends", - "Eating cucumbers with 1 friends", - "Eating cucumbers with 0 friends" - ] -} \ No newline at end of file diff --git a/testdata/src/examples-tables.naming-strategy.long-exclude-feature-name.txt b/testdata/src/examples-tables.naming-strategy.long-exclude-feature-name.txt new file mode 100644 index 00000000..3c3df319 --- /dev/null +++ b/testdata/src/examples-tables.naming-strategy.long-exclude-feature-name.txt @@ -0,0 +1,9 @@ +Eating cucumbers - These are passing - #1.1 +Eating cucumbers - These are passing - #1.2 +Eating cucumbers - These are failing - #2.1 +Eating cucumbers - These are failing - #2.2 +Eating cucumbers - These are undefined because the value is not an {int} - #3.1 +Eating cucumbers - These are undefined because the value is not an {int} - #3.2 +Eating cucumbers with friends - #1.1: Eating cucumbers with 11 friends +Eating cucumbers with friends - #1.2: Eating cucumbers with 1 friends +Eating cucumbers with friends - #1.3: Eating cucumbers with 0 friends diff --git a/testdata/src/examples-tables.naming-strategy.long-with-pickle-name-if-parameterized.txt b/testdata/src/examples-tables.naming-strategy.long-with-pickle-name-if-parameterized.txt new file mode 100644 index 00000000..9a84f697 --- /dev/null +++ b/testdata/src/examples-tables.naming-strategy.long-with-pickle-name-if-parameterized.txt @@ -0,0 +1,9 @@ +Examples Tables - Eating cucumbers - These are passing - #1.1 +Examples Tables - Eating cucumbers - These are passing - #1.2 +Examples Tables - Eating cucumbers - These are failing - #2.1 +Examples Tables - Eating cucumbers - These are failing - #2.2 +Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - #3.1 +Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - #3.2 +Examples Tables - Eating cucumbers with friends - #1.1: Eating cucumbers with 11 friends +Examples Tables - Eating cucumbers with friends - #1.2: Eating cucumbers with 1 friends +Examples Tables - Eating cucumbers with friends - #1.3: Eating cucumbers with 0 friends diff --git a/testdata/src/examples-tables.naming-strategy.long-with-pickle-name.txt b/testdata/src/examples-tables.naming-strategy.long-with-pickle-name.txt new file mode 100644 index 00000000..91803a32 --- /dev/null +++ b/testdata/src/examples-tables.naming-strategy.long-with-pickle-name.txt @@ -0,0 +1,9 @@ +Examples Tables - Eating cucumbers - These are passing - Eating cucumbers +Examples Tables - Eating cucumbers - These are passing - Eating cucumbers +Examples Tables - Eating cucumbers - These are failing - Eating cucumbers +Examples Tables - Eating cucumbers - These are failing - Eating cucumbers +Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - Eating cucumbers +Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - Eating cucumbers +Examples Tables - Eating cucumbers with friends - Eating cucumbers with 11 friends +Examples Tables - Eating cucumbers with friends - Eating cucumbers with 1 friends +Examples Tables - Eating cucumbers with friends - Eating cucumbers with 0 friends diff --git a/testdata/src/examples-tables.naming-strategy.long.txt b/testdata/src/examples-tables.naming-strategy.long.txt new file mode 100644 index 00000000..9a84f697 --- /dev/null +++ b/testdata/src/examples-tables.naming-strategy.long.txt @@ -0,0 +1,9 @@ +Examples Tables - Eating cucumbers - These are passing - #1.1 +Examples Tables - Eating cucumbers - These are passing - #1.2 +Examples Tables - Eating cucumbers - These are failing - #2.1 +Examples Tables - Eating cucumbers - These are failing - #2.2 +Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - #3.1 +Examples Tables - Eating cucumbers - These are undefined because the value is not an {int} - #3.2 +Examples Tables - Eating cucumbers with friends - #1.1: Eating cucumbers with 11 friends +Examples Tables - Eating cucumbers with friends - #1.2: Eating cucumbers with 1 friends +Examples Tables - Eating cucumbers with friends - #1.3: Eating cucumbers with 0 friends diff --git a/testdata/src/examples-tables.naming-strategy.short.txt b/testdata/src/examples-tables.naming-strategy.short.txt new file mode 100644 index 00000000..88c1ded6 --- /dev/null +++ b/testdata/src/examples-tables.naming-strategy.short.txt @@ -0,0 +1,9 @@ +#1.1 +#1.2 +#2.1 +#2.2 +#3.1 +#3.2 +#1.1: Eating cucumbers with 11 friends +#1.2: Eating cucumbers with 1 friends +#1.3: Eating cucumbers with 0 friends diff --git a/testdata/src/hooks.findAllTestCaseStartedGroupedByFeature.results.json b/testdata/src/hooks.findAllTestCaseStartedGroupedByFeature.results.json deleted file mode 100644 index 550e5d7c..00000000 --- a/testdata/src/hooks.findAllTestCaseStartedGroupedByFeature.results.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - [ - "Hooks", - [ - "29", - "30", - "31" - ] - ] -] \ No newline at end of file diff --git a/testdata/src/hooks.findFeatureBy.results.json b/testdata/src/hooks.findFeatureBy.results.json deleted file mode 100644 index f39fd7b3..00000000 --- a/testdata/src/hooks.findFeatureBy.results.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "Hooks", - "Hooks", - "Hooks" -] \ No newline at end of file diff --git a/testdata/src/hooks.findNameOf.results.json b/testdata/src/hooks.findNameOf.results.json deleted file mode 100644 index 216ffbe8..00000000 --- a/testdata/src/hooks.findNameOf.results.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "long" : [ - "Hooks - No tags and a passed step", - "Hooks - No tags and a failed step", - "Hooks - No tags and a undefined step" - ], - "excludeFeatureName" : [ - "No tags and a passed step", - "No tags and a failed step", - "No tags and a undefined step" - ], - "longPickleName" : [ - "Hooks - No tags and a passed step", - "Hooks - No tags and a failed step", - "Hooks - No tags and a undefined step" - ], - "short" : [ - "No tags and a passed step", - "No tags and a failed step", - "No tags and a undefined step" - ], - "shortPickleName" : [ - "No tags and a passed step", - "No tags and a failed step", - "No tags and a undefined step" - ] -} \ No newline at end of file diff --git a/testdata/src/minimal.findAllTestCaseStartedGroupedByFeature.results.json b/testdata/src/minimal.findAllTestCaseStartedGroupedByFeature.results.json deleted file mode 100644 index b9641bfa..00000000 --- a/testdata/src/minimal.findAllTestCaseStartedGroupedByFeature.results.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - [ - "minimal", - [ - "8" - ] - ] -] \ No newline at end of file diff --git a/testdata/src/minimal.findFeatureBy.results.json b/testdata/src/minimal.findFeatureBy.results.json deleted file mode 100644 index d78870cb..00000000 --- a/testdata/src/minimal.findFeatureBy.results.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "minimal" -] \ No newline at end of file diff --git a/testdata/src/minimal.findNameOf.results.json b/testdata/src/minimal.findNameOf.results.json deleted file mode 100644 index bcfb4fe7..00000000 --- a/testdata/src/minimal.findNameOf.results.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "long" : [ - "minimal - cukes" - ], - "excludeFeatureName" : [ - "cukes" - ], - "longPickleName" : [ - "minimal - cukes" - ], - "short" : [ - "cukes" - ], - "shortPickleName" : [ - "cukes" - ] -} \ No newline at end of file diff --git a/testdata/src/minimal.naming-strategy.long-exclude-feature-name.txt b/testdata/src/minimal.naming-strategy.long-exclude-feature-name.txt new file mode 100644 index 00000000..f15fafb5 --- /dev/null +++ b/testdata/src/minimal.naming-strategy.long-exclude-feature-name.txt @@ -0,0 +1 @@ +cukes diff --git a/testdata/src/minimal.naming-strategy.long-with-pickle-name-if-parameterized.txt b/testdata/src/minimal.naming-strategy.long-with-pickle-name-if-parameterized.txt new file mode 100644 index 00000000..94a83382 --- /dev/null +++ b/testdata/src/minimal.naming-strategy.long-with-pickle-name-if-parameterized.txt @@ -0,0 +1 @@ +minimal - cukes diff --git a/testdata/src/minimal.naming-strategy.long-with-pickle-name.txt b/testdata/src/minimal.naming-strategy.long-with-pickle-name.txt new file mode 100644 index 00000000..94a83382 --- /dev/null +++ b/testdata/src/minimal.naming-strategy.long-with-pickle-name.txt @@ -0,0 +1 @@ +minimal - cukes diff --git a/testdata/src/minimal.naming-strategy.long.txt b/testdata/src/minimal.naming-strategy.long.txt new file mode 100644 index 00000000..94a83382 --- /dev/null +++ b/testdata/src/minimal.naming-strategy.long.txt @@ -0,0 +1 @@ +minimal - cukes diff --git a/testdata/src/minimal.naming-strategy.short.txt b/testdata/src/minimal.naming-strategy.short.txt new file mode 100644 index 00000000..f15fafb5 --- /dev/null +++ b/testdata/src/minimal.naming-strategy.short.txt @@ -0,0 +1 @@ +cukes diff --git a/testdata/src/rules.findAllTestCaseStartedGroupedByFeature.results.json b/testdata/src/rules.findAllTestCaseStartedGroupedByFeature.results.json deleted file mode 100644 index 3322ae37..00000000 --- a/testdata/src/rules.findAllTestCaseStartedGroupedByFeature.results.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - [ - "Usage of a `Rule`", - [ - "55", - "56", - "57" - ] - ] -] \ No newline at end of file diff --git a/testdata/src/rules.findFeatureBy.results.json b/testdata/src/rules.findFeatureBy.results.json deleted file mode 100644 index 54d3c091..00000000 --- a/testdata/src/rules.findFeatureBy.results.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "Usage of a `Rule`", - "Usage of a `Rule`", - "Usage of a `Rule`" -] \ No newline at end of file diff --git a/testdata/src/rules.findNameOf.results.json b/testdata/src/rules.findNameOf.results.json deleted file mode 100644 index 81a492f1..00000000 --- a/testdata/src/rules.findNameOf.results.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "long" : [ - "Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Not enough money", - "Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Enough money", - "Usage of a `Rule` - a sale cannot happen if there is no stock - No chocolates left" - ], - "excludeFeatureName" : [ - "A sale cannot happen if the customer does not have enough money - Not enough money", - "A sale cannot happen if the customer does not have enough money - Enough money", - "a sale cannot happen if there is no stock - No chocolates left" - ], - "longPickleName" : [ - "Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Not enough money", - "Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Enough money", - "Usage of a `Rule` - a sale cannot happen if there is no stock - No chocolates left" - ], - "short" : [ - "Not enough money", - "Enough money", - "No chocolates left" - ], - "shortPickleName" : [ - "Not enough money", - "Enough money", - "No chocolates left" - ] -} \ No newline at end of file diff --git a/testdata/src/rules.naming-strategy.long-exclude-feature-name.txt b/testdata/src/rules.naming-strategy.long-exclude-feature-name.txt new file mode 100644 index 00000000..bb113836 --- /dev/null +++ b/testdata/src/rules.naming-strategy.long-exclude-feature-name.txt @@ -0,0 +1,3 @@ +A sale cannot happen if the customer does not have enough money - Not enough money +A sale cannot happen if the customer does not have enough money - Enough money +a sale cannot happen if there is no stock - No chocolates left diff --git a/testdata/src/rules.naming-strategy.long-with-pickle-name-if-parameterized.txt b/testdata/src/rules.naming-strategy.long-with-pickle-name-if-parameterized.txt new file mode 100644 index 00000000..2bf577f8 --- /dev/null +++ b/testdata/src/rules.naming-strategy.long-with-pickle-name-if-parameterized.txt @@ -0,0 +1,3 @@ +Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Not enough money +Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Enough money +Usage of a `Rule` - a sale cannot happen if there is no stock - No chocolates left diff --git a/testdata/src/rules.naming-strategy.long-with-pickle-name.txt b/testdata/src/rules.naming-strategy.long-with-pickle-name.txt new file mode 100644 index 00000000..2bf577f8 --- /dev/null +++ b/testdata/src/rules.naming-strategy.long-with-pickle-name.txt @@ -0,0 +1,3 @@ +Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Not enough money +Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Enough money +Usage of a `Rule` - a sale cannot happen if there is no stock - No chocolates left diff --git a/testdata/src/rules.naming-strategy.long.txt b/testdata/src/rules.naming-strategy.long.txt new file mode 100644 index 00000000..2bf577f8 --- /dev/null +++ b/testdata/src/rules.naming-strategy.long.txt @@ -0,0 +1,3 @@ +Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Not enough money +Usage of a `Rule` - A sale cannot happen if the customer does not have enough money - Enough money +Usage of a `Rule` - a sale cannot happen if there is no stock - No chocolates left diff --git a/testdata/src/rules.naming-strategy.short.txt b/testdata/src/rules.naming-strategy.short.txt new file mode 100644 index 00000000..80c4e7fd --- /dev/null +++ b/testdata/src/rules.naming-strategy.short.txt @@ -0,0 +1,3 @@ +Not enough money +Enough money +No chocolates left