Discussion:
[Cucumber] not able to rerun failed test cases from rerun.txt file
(too old to reply)
Murali krishna
2018-03-06 22:01:16 UTC
Permalink
Raw Message
we are planning to implement rerun the failed test cases and i have written
another runner file to run the failed sceanrios from rerun.txt file.

*First Runner file:*

package com.test;

import org.junit.runner.RunWith;
import org.testng.annotations.AfterSuite;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.*;


import com.test.*;

@RunWith(Cucumber.class)

@CucumberOptions(features = ".",

tags = { "@TC010,@TC011" },
monochrome = true, plugin = { "pretty",
"html:target/cucumber-report/runwebat",
"json:target/cucumber-report/runwebat/cucumber.json",
"json:target/cucumber-report/cucumber.json",
"rerun:target/cucumber-report/runwebat/rerun.txt",
"json:target/report.json" },
glue = "com.test",
dryRun=false
)
public class RunWebATSuite {

}

*Second Runner File:*

package com.test;

import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(
monochrome = true,

features = {"@target/cucumber-report/runwebat/rerun.txt"},//Cucumber
picks the failed scenarios from this file
plugin = {
"json:target/cucumber-report/runwebat/cucumber.json","pretty",

"html:target/cucumber-report/runwebat",
"json:target/cucumber-report/runwebat/cucumber2.json",
"json:target/cucumber-report/cucumber2.json",
"rerun:target/cucumber-report/runwebat/rerun2.txt",
},
glue = "com.test"
)

public class _RunWebATSuite {
}

Problem:
First runner file is creating teh rerun.txt file with failed
scenarios(below format).But it is not rerunning the failed test cases.

src/test/resources/features/XXXXXX/TC010_OFACRelease.feature:91

<Loading Image...>


please help on this how to rerun the failed test cases.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...