How to run a specific test plan

Sawyer

I am setting up my test environment to run tests on file changes, but I don't want to run all the test plans when test cases are changed.

How can I run a specific test plan in Perl? For example, I only want to run "test2"?

t/test.t

use Test::More;  
ok(1, "test1");

ok(1, "test2");
... 
done_testing();
marcosjsramos

If I were you I'd do the following:

1 - if you might want to separate some test from the others, put it in some other test suite...

t/00-always_runs.t
t/01-maybe_not_so_often.t

2 - if the test you're willing to skip depends on some feature or availability on some object, try using a skip block like in Test::More documentation

SKIP: {
    skip $why, $how_many unless $have_some_feature;

    ok( foo(),       $test_name );
    is( foo(42), 23, $test_name );
};

From https://metacpan.org/pod/Test::More

Hope it helps and gets you going! Good luck.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I run a specific 'thread group' in a JMeter 'test plan' from the command line?

From Dev

How to create a test run/plan for a C++ Program?

From Dev

How to run jUnit test in specific folder by gradle?

From Dev

How to run specific test in Nose2

From Dev

How to run a specific junit test in ant with parameter?

From Dev

How to run a specific test case from a test suite using InternIO

From Dev

Jmeter: How to map specific variable values from CSV file to specific thread-groups in a test plan

From Dev

Executing Specific JMeter Thread Groups in a Test Plan

From Dev

Executing Specific JMeter Thread Groups in a Test Plan

From Dev

How do I run a specific Dart _test file with pub run test?

From Dev

How do I run specific tests using dotnet test?

From Dev

How to hit breakpoint only when some specific unit test is run?

From Dev

How to run specific tests using SBT Jenkins Plugin for ScalaTest test

From Dev

How to run a single specific test case when using protractor

From Dev

How do I run an RSpec test on a specific line?

From Dev

Maven unable to run specific test

From Dev

Run specific test using espresso

From Dev

How to run specific test cases from a test suite using Robot Framework

From Dev

How to run an android test

From Dev

how to ignore a RUN test

From Dev

How to run a NUnit test?

From Dev

How to run ./gradlew test

From Dev

How to run test in nightwatch?

From Dev

How to parse tree from TFS Test Plan

From Dev

How to skip specific Execution Plan Steps?

From Dev

Run test in phpunit with specific php version

From Dev

Run just a specific scalatest test from sbt

From Dev

Scalatest run code before and after specific test

From Dev

specs2 run a specific test

Related Related

HotTag

Archive