Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vividus] countScenarios task calculation fixing #3157

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VolhaHurynovich
Copy link
Contributor

  • At the current moment
  1. countScenarios is using properties' files (overriding.properties) instead of argument dir in CMD.
    private static void configureStoryLocation(String storyLocation)
    {
        Properties properties = BeanFactory.getBean("properties", Properties.class);
        properties.put("bdd.story-loader.batch-1.resource-location", storyLocation);
        properties.put("bdd.story-loader.batch-1.resource-include-patterns", "**/*.story");
        properties.put("bdd.story-loader.batch-1.resource-exclude-patterns", "");
    }

doesn't help.

  1. It is using JUnit4StoryRunner runner = new JUnit4StoryRunner(StoriesRunner.class); and runner.getDescription() for calculating, but there is a problem with Lifecycle Examples (Scenarios count more than expected, but Scenarios with Examples is right). For example:
Lifecycle:
Given I am on a page with the URL 'https://vividus-test-site.herokuapp.com/stickyHeader.html'
Examples:
|action         |firstP             |batchName           |
|COMPARE_AGAINST|By.xpath((.//p)[1])|Vividus System Tests|
|COMPARE_AGAINST|By.xpath((.//p)[2])|Vividus System Tests|
  1. Also when we specify empty directory we want to see 0 | Stories, but now it is 1 | Stories.

  2. For executing ./gradlew countScenarios -p vividus-tests it is necessary to specify properties in overriding.properties file to avoid errors (for example, Exception in thread "main" org.vividus.resource.ResourceLoadException: No ExamplesTable resource is found for /data/tables/system/mobile_app/locators/${target-platform}.table ). Also there is a problem with such scenario:

Scenario: Should use Examples Table from temporary local file
Then `<name>` is equal to `testValue`
Examples:
file:///${examples-table-temporary-file}
  • Proposed in PR solution doesn't work when in Lifecycle Examples contains file (doesn't calculate these scenarios). For example:
Lifecycle:
Examples:
/data/tables/system/mobile_app/locators/${target-platform}.table

After executing ./gradlew countScenarios -p vividus-tests
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The countScenarios task calculation shows always 1 for all entities
1 participant