Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Loggins for empty or non existing feature dir is added. Exeptions wil… #155

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

Conversation

vilkg
Copy link

@vilkg vilkg commented Dec 8, 2017

…l no longer be thrown.

Test to support case when added feature dir has no features in it added;
Test for behavior when feature dir does not exist modified to check new scenario when exception is no longer thrown.

@@ -190,13 +190,20 @@
public void execute() throws MojoExecutionException {

if (!featuresDirectory.exists()) {
throw new MojoExecutionException("Features directory does not exist");
getLog().warn("Features directory does not exist");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resources plugin just informs us about skipping the non existing resources but does include the missing directory name. The first keeps the messages standardized, the latter is helpful.

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simmetrics-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mpkorstanje/Projects/SimMetrics/simmetrics/simmetrics-example/src/test/resources

So I think this should be skip non existing featuresDirectory /home/user/path/to/features


createOutputDirIfRequired();
if (featureFiles.isEmpty()) {
getLog().warn("Features directory is empty. No runners will be generated.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surefire informs us that there were no tests to run.

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ simmetrics-example ---
[INFO] No tests to run.

I think this should be No runners to generate.

It is also possible that when there are feature files, none generate runners due to a combination of tags. So I think this notification should be moved to the CucumberITGenerator implementations.

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

Successfully merging this pull request may close these issues.

2 participants