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

Rerun Functionality #30

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6089cca
Added files via upload
sugatmankar May 6, 2016
0cd8469
Added files via upload
sugatmankar May 6, 2016
44e433f
Added files via upload
sugatmankar May 6, 2016
735a6f2
Update readme.md
sugatmankar May 6, 2016
9ab1694
Update readme.md
sugatmankar May 6, 2016
2f00929
update pom.xml
sugatmankar May 19, 2016
f4ea3c1
Update ClassNameGenerator.java
sugatmankar May 19, 2016
ec0c6a9
Update CucumberITGenerator.java
sugatmankar May 19, 2016
2f0f1e9
Update FileGeneratorConfig.java
sugatmankar May 19, 2016
659d48b
Update GenerateRunnersMojo.java
sugatmankar May 19, 2016
b5697c0
Update OverriddenCucumberOptionsParameters.java
sugatmankar May 19, 2016
9c2ade6
Update OverriddenRerunOptionsParameters.java
sugatmankar May 19, 2016
5473d35
Update ExtendedRuntimeOptions.java
sugatmankar May 19, 2016
bcc6b92
Update RuntimeOptions.java
sugatmankar May 19, 2016
7e78e8c
Update cucumber-junit-re-runner.vm
sugatmankar May 19, 2016
13a8d22
resolve conflicts 1.3.0
sugatmankar May 20, 2016
9553896
removed preveous conflicts
sugatmankar May 20, 2016
a47a9d7
Merge branch 'master' of https://github.com/sugatmankar/cucumber-jvm-…
sugatmankar May 20, 2016
ec19229
new changes 1.3.0
sugatmankar May 20, 2016
3841989
added 1.3.0
sugatmankar May 20, 2016
6aba3c9
thread count updated in pom.xml
sugatmankar May 20, 2016
cfa938b
added missing classes
sugatmankar May 20, 2016
f5f079c
update pom.xml
sugatmankar May 21, 2016
638f712
Update Readme
sugatmankar May 21, 2016
882eacd
Update README.md
sugatmankar May 21, 2016
994817e
updated retryCount default value to 0
sugatmankar May 24, 2016
e70679a
Merge https://github.com/temyers/cucumber-jvm-parallel-plugin
sugatmankar May 25, 2016
e41d629
updated junit retry param and JUnitRetryCount property
sugatmankar May 25, 2016
7000316
removed junit-rerun it
May 25, 2016
50a9134
Updated README.md: removed unused property useJunitRerun
May 25, 2016
5254839
resolved checkstyle conflicts and junit-rerun it runner
sugatmankar Jun 6, 2016
de5502a
resolved checkstyle conflicts and junit-rerun it runner
sugatmankar Jun 6, 2016
3f57165
resolved checkstyle errors
sugatmankar Jun 6, 2016
7f49f96
added feature files under junit-rerun
sugatmankar Jun 6, 2016
fff7b84
added tagwise gen logic
sugatmankar Jun 6, 2016
bb8525b
changes for tagwise run
sugatmankar Jun 13, 2016
9ecd7fa
removed tmp _jb_tmp file
sugatmankar Jun 13, 2016
17af7c7
thread count pom.xml
sugatmankar Jun 13, 2016
033f8ae
Update custom-output-directory-verify-groovy
sugatmankar Dec 9, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ Usage
Add the following to your POM file:

```xml
<dependencies>
<dependency>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>1.2.2</version>
</dependency>
</dependencies>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<executions>
<execution>
<id>generateRunners</id>
Expand Down Expand Up @@ -50,6 +57,10 @@ Add the following to your POM file:
<useTestNG>false</useTestNG>
<!-- The naming scheme to use for the generated test classes. One of 'simple' or 'feature-title' -->
<namingScheme>simple</namingScheme>
<!-- Generate ReRun runners instead of JUnit and TestNG. -->
<useReRun>true</useReRun>
Copy link
Owner

Choose a reason for hiding this comment

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

Ok, there are now two properties defining which template to use: useTestNG and useReRun.

This adds complication - should rerun + testNG be supported together?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't try for TestNG. Once i'm done with current changes. Will look for TestNG as well. :)

<!-- Max retry can be 5. -->
<retryCount>2</retryCount>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -90,6 +101,10 @@ A. The plugin is considered feature complete. If you feel there is something mi

Changelog
=========
1.2.2
-----
* Added support for rerunning only failed scenarios.

1.2.1
-----
* issue#15 (re-opened) Fix compilations errors generated by 1.2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
package com.github.timm.cucumber.generate;

import com.google.common.base.CaseFormat;
import org.apache.commons.io.FilenameUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ClassNameGenerator {

Pattern startsWithDigit = Pattern.compile("^\\d.*");

public String generateClassNameFromFeatureFileName(String featureFileName, int fileCounter) {

String fileNameWithNoExtension= FilenameUtils.removeExtension(featureFileName);

fileNameWithNoExtension=fileNameWithNoExtension.replaceAll("_","-");
fileNameWithNoExtension=fileNameWithNoExtension.replaceAll(" ","");

String className = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, fileNameWithNoExtension);

Matcher startsWithDigitCheck = startsWithDigit.matcher(className);

if(startsWithDigitCheck.matches()){
className="_"+className;
}

return String.format(className+"%02dIT.java",fileCounter);
}

public String generateSimpleClassName(int fileCounter) {

return String.format("Parallel%02dIT.java",fileCounter);

}

}
package com.github.temyers.generate;
Copy link
Owner

Choose a reason for hiding this comment

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

It looks like you're using a different formatter.

What IDE are you using?
I am using Eclipse + Default Eclipse formatter rules.

Please could you reconcile - it makes reviewing much easier (I realise I haven't defined a standard so far)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for that mistake. I am using Intellij IDEA 14.1.1 . will fix this as soon as possible.


import com.google.common.base.CaseFormat;
import org.apache.commons.io.FilenameUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* Created by cwr.sugad.mankar on 5/4/2016.
*/
public class ClassNameGenerator {
Pattern startsWithDigit = Pattern.compile("^\\d.*");

public String generateClassNameFromFeatureFileName(String featureFileName, int fileCounter) {

String fileNameWithNoExtension= FilenameUtils.removeExtension(featureFileName);

fileNameWithNoExtension=fileNameWithNoExtension.replaceAll("_","-");
fileNameWithNoExtension=fileNameWithNoExtension.replaceAll(" ","");

String className = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, fileNameWithNoExtension);

Matcher startsWithDigitCheck = startsWithDigit.matcher(className);

if(startsWithDigitCheck.matches()){
className="_"+className;
}

return String.format(className+"%02dIT.java",fileCounter);
}

public String generateSimpleClassName(int fileCounter) {

return String.format("Parallel%02dIT.java",fileCounter);

}
}
Loading