In Gradle, how to run test running task in unit test


+1 vote
asked Mar 6, 2016 by Qvf578 (550 points)
For instance, following is gradle doc:class GreetingTaskTest { @Test public void canAddTaskToProject() { Project project = ProjectBuilder.

5 Answers

0 votes
answered Mar 12, 2016 by Fbywilks (530 points)

We name the task sample Test and include our tests.
The task Name is the name of the task of type Test in our project. Actually the pattern for the system property is task Name. If we want to run a single test we can use the Java system property test.
commented Mar 14, 2016 by Exception (1,820 points) 1 flag
Frankly this seems like more of a solution in search of a problem than anything
0 votes
answered Mar 24, 2016 by tomichek (640 points)
0 votes
answered Mar 28, 2016 by mccullum (580 points)
This should actually work fine. I found this solution Getting 'java.lang.NoClassDefFoundError ... - Gradle Forums and i am using it in my project
0 votes
answered Apr 18, 2016 by ba_as (2,110 points)
If you need something more accurate then have a look at this. You can find here Gradle Goodness: Running a Single Test - DZone DevOps all that you are looking for
0 votes
answered Apr 24, 2016 by misused_klim (1,110 points)
If you need something more accurate then have a look at this. You can find here Gradle Goodness: Running a Single Test - DZone DevOps all that you are looking for

Related questions


What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...