mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-04-19 11:21:56 +02:00
tag slow tests, so they can be excluded/included
as the runtime of the tests can be long, tag the slow ones so they can be excluded more easy on the command line or configuration. see here for hints: https://mkyong.com/junit5/junit-5-tagging-and-filtering-tag-examples/ https://stackoverflow.com/questions/60474190/how-to-include-exclude-junit5-tags-in-gradle-cmd to run tests with tag slow only, or not run tags with tag slow do, quoting the expression might be necessary depending on the shell: mvn clean install -Dtest=FuraffinityRipperTest -Dgroups=slow mvn clean install -Dtest=FuraffinityRipperTest '-Dgroups=!slow'
This commit is contained in:
parent
0e5d9cfb54
commit
118c353f2d
@ -88,10 +88,13 @@ This will include all dependencies in the JAR.
|
||||
|
||||
# Running Tests
|
||||
|
||||
After building you can run tests by running the following:
|
||||
Tests can be marked as beeing slow or not. Default is to run all tests. Slow tests can be excluded to run, and slow
|
||||
tests can be run on its own. After building you can run tests, quoting might be necessary depending on your shell:
|
||||
|
||||
```bash
|
||||
mvn test
|
||||
mvn test -Dgroups=slow
|
||||
mvn test '-Dgroups=!slow'
|
||||
```
|
||||
|
||||
Please note that some tests may fail as sites change and our rippers become out of date.
|
||||
|
15
pom.xml
15
pom.xml
@ -143,18 +143,7 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
<configuration>
|
||||
<!--<groups>fast</groups>-->
|
||||
<excludedGroups>slow</excludedGroups>
|
||||
<properties>
|
||||
<!--
|
||||
<configurationParameters>
|
||||
junit.jupiter.conditions.deactivate = *
|
||||
</configurationParameters>
|
||||
-->
|
||||
</properties>
|
||||
</configuration>
|
||||
<version>3.0.0-M5</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
@ -163,7 +152,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<version>3.0.0-M5</version>
|
||||
<configuration>
|
||||
<showSuccess>false</showSuccess>
|
||||
</configuration>
|
||||
|
@ -5,15 +5,18 @@ import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.FuraffinityRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class FuraffinityRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("slow")
|
||||
public void testFuraffinityAlbum() throws IOException {
|
||||
FuraffinityRipper ripper = new FuraffinityRipper(new URL("https://www.furaffinity.net/gallery/spencerdragon/"));
|
||||
testRipper(ripper);
|
||||
}
|
||||
@Test
|
||||
@Tag("slow")
|
||||
public void testFuraffinityScrap() throws IOException {
|
||||
FuraffinityRipper ripper = new FuraffinityRipper(new URL("http://www.furaffinity.net/scraps/sssonic2/"));
|
||||
testRipper(ripper);
|
||||
|
Loading…
x
Reference in New Issue
Block a user