GithubHelp home page GithubHelp logo

sskorol / test-data-supplier-maven-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 4.65 MB

A basic sample, which demonstrates test-data-supplier library usage

License: Apache License 2.0

Java 100.00%
allure2 testng maven test-data-supplier java-8 dataprovider test-automation qaa

test-data-supplier-maven-example's Introduction

Test Data Supplier Maven Example

A basic example, which demonstrates test-data-supplier library usage.

Based on allure2-testng-report project.

You can find DataSupplier samples in the following class: io.github.sskorol.testcases.common.CommonTests.

For report generation and publishing see allure-maven plugin commands.

test-data-supplier-maven-example's People

Contributors

sskorol avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

reddigokul

test-data-supplier-maven-example's Issues

Unable to run tests, annotated with @DataSupplier, from IDE

Done all necessary setup to apply @DataSupplier.
And everything works fine when running tests with build tool (Maven in my case).
But when running tests with IDE (Run as...), it fails.
I annotated my test class with @Listeners(DataProviderTransformer.class), but still no luck.

Here is my minimum code:

@Listeners(DataProviderTransformer.class)
public class TestSupplier extends BaseSupplier {

    @Test(dataProvider = "provider")
    public void test1(String param) throws Exception {
        System.out.println(param);
    }

    @DataSupplier
    public List<String> provider() {
        return ImmutableList.of("A", "B", "C", "D");
    }

}

Stacktrace:

[Utils] [ERROR] [Error] org.testng.TestNGException: 
Method public void com.test.TestSupplier.test1(java.lang.String) throws java.lang.Exception requires a @DataProvider named : provider
	at org.testng.internal.Parameters.findDataProvider(Parameters.java:336)
	at org.testng.internal.Parameters.handleParameters(Parameters.java:498)
	at org.testng.internal.Invoker.handleParameters(Invoker.java:1308)
	at org.testng.internal.Invoker.createParameters(Invoker.java:1036)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1126)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:744)
	at org.testng.TestRunner.run(TestRunner.java:602)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
	at org.testng.TestNG.runSuites(TestNG.java:1144)
	at org.testng.TestNG.run(TestNG.java:1115)
	at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
	at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.