mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-04-21 04:11:50 +02:00
Merge pull request #1718 from soloturn/junit5
Junit5 allow switch off slow or flaky tests
This commit is contained in:
commit
7f4f6d95ba
4
.github/workflows/maven.yml
vendored
4
.github/workflows/maven.yml
vendored
@ -9,11 +9,11 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
java: [1.8, 1.9]
|
||||
java: [1.8, 1.14]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
|
@ -88,10 +88,14 @@ 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 flaky. Default is to run all but the flaky tests. Slow tests can be excluded to
|
||||
run. slow and flaky 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 -DexcludedGroups= -Dgroups=flaky,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
@ -7,6 +7,7 @@
|
||||
<name>ripme</name>
|
||||
<url>http://rip.rarchives.com</url>
|
||||
<properties>
|
||||
<excludedGroups>flaky</excludedGroups>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
@ -143,17 +144,9 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
<version>3.0.0-M5</version>
|
||||
<configuration>
|
||||
<!--<groups>fast</groups>-->
|
||||
<excludedGroups>slow</excludedGroups>
|
||||
<properties>
|
||||
<!--
|
||||
<configurationParameters>
|
||||
junit.jupiter.conditions.deactivate = *
|
||||
</configurationParameters>
|
||||
-->
|
||||
</properties>
|
||||
<excludedGroups>${excludedGroups}</excludedGroups>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@ -163,7 +156,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>
|
||||
|
@ -4,6 +4,7 @@ import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.CheveretoRipper;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class CheveretoRipperTest extends RippersTest {
|
||||
@ -13,6 +14,7 @@ public class CheveretoRipperTest extends RippersTest {
|
||||
testRipper(ripper);
|
||||
}
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testSubdirAlbum() throws IOException {
|
||||
CheveretoRipper ripper = new CheveretoRipper(new URL("https://kenzato.uk/booru/album/TnEc"));
|
||||
testRipper(ripper);
|
||||
|
@ -4,6 +4,7 @@ import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.ErotivRipper;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class ErotivRipperTest extends RippersTest {
|
||||
@ -21,6 +22,7 @@ public class ErotivRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testGetURLsFromPage() throws IOException {
|
||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
||||
ErotivRipper ripper = new ErotivRipper(url);
|
||||
|
@ -5,6 +5,7 @@ import java.net.URL;
|
||||
import com.rarchives.ripme.ripper.rippers.FolioRipper;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class FolioRipperTest extends RippersTest {
|
||||
@ -13,6 +14,7 @@ public class FolioRipperTest extends RippersTest {
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testFolioRip() throws IOException {
|
||||
FolioRipper ripper = new FolioRipper(new URL("https://folio.ink/DmBe6i"));
|
||||
testRipper(ripper);
|
||||
|
@ -4,10 +4,12 @@ import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.FooktubeRipper;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class FooktubeRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testFooktubeVideo() throws IOException {
|
||||
FooktubeRipper ripper = new FooktubeRipper(new URL("https://fooktube.com/video/641/in-the-cinema")); //pick any video from the front page
|
||||
testRipper(ripper);
|
||||
|
@ -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);
|
||||
|
@ -5,10 +5,12 @@ import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.GfycatporntubeRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class GfycatporntubeRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRip() throws IOException {
|
||||
GfycatporntubeRipper ripper = new GfycatporntubeRipper(new URL("https://gfycatporntube.com/blowjob-bunny-puts-on-a-show/"));
|
||||
testRipper(ripper);
|
||||
|
@ -7,10 +7,12 @@ import java.util.Map;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.ImagefapRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class ImagefapRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testImagefapAlbums() throws IOException {
|
||||
Map<URL, String> testURLs = new HashMap<>();
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.rarchives.ripme.ripper.rippers.ImgurRipper.ImgurAlbum;
|
||||
import com.rarchives.ripme.utils.RipUtils;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -57,6 +58,7 @@ public class ImgurRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testImgurSingleImage() throws IOException {
|
||||
List<URL> contentURLs = new ArrayList<>();
|
||||
contentURLs.add(new URL("http://imgur.com/qbfcLyG")); // Single image URL
|
||||
|
@ -5,10 +5,12 @@ import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.LusciousRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class LusciousRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testPahealRipper() throws IOException {
|
||||
// a photo set
|
||||
LusciousRipper ripper = new LusciousRipper(
|
||||
@ -24,6 +26,7 @@ public class LusciousRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testGetNextPage() throws IOException {
|
||||
URL multiPageAlbumUrl = new URL("https://luscious.net/albums/women-of-color_58/");
|
||||
LusciousRipper multiPageRipper = new LusciousRipper(multiPageAlbumUrl);
|
||||
|
@ -5,12 +5,12 @@ import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.PichunterRipper;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class PichunterRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("This test was commented out at 6/08/2018 because it was randomly failing due to issues with the site see https://github.com/RipMeApp/ripme/issues/867")
|
||||
@Tag("flaky")
|
||||
public void testPichunterModelPageRip() throws IOException {
|
||||
// A non-photoset
|
||||
PichunterRipper ripper = new PichunterRipper(new URL("https://www.pichunter.com/models/Madison_Ivy"));
|
||||
@ -18,6 +18,7 @@ public class PichunterRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testPichunterGalleryRip() throws IOException {
|
||||
// a photo set
|
||||
PichunterRipper ripper = new PichunterRipper(
|
||||
|
@ -7,19 +7,20 @@ import java.net.URL;
|
||||
import com.rarchives.ripme.ripper.rippers.RedditRipper;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class RedditRipperTest extends RippersTest {
|
||||
|
||||
@Test
|
||||
@Disabled("Rip is flaky") // https://github.com/RipMeApp/ripme/issues/253
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/253
|
||||
public void testRedditSubredditRip() throws IOException {
|
||||
RedditRipper ripper = new RedditRipper(new URL("http://www.reddit.com/r/nsfw_oc"));
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("Rip is flaky") // https://github.com/RipMeApp/ripme/issues/253
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/253
|
||||
public void testRedditSubredditTopRip() throws IOException {
|
||||
RedditRipper ripper = new RedditRipper(new URL("http://www.reddit.com/r/nsfw_oc/top?t=all"));
|
||||
testRipper(ripper);
|
||||
@ -33,12 +34,13 @@ public class RedditRipperTest extends RippersTest {
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
/**
|
||||
/**testRedditSubredditRip:19
|
||||
* GFYCAT TEST Tests a good GfycatURL (no "/gifs/detail")
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRedditGfyGoodURL() throws IOException {
|
||||
RedditRipper ripper = new RedditRipper(
|
||||
new URL("https://www.reddit.com/r/bottesting/comments/7msozf/good_link/"));
|
||||
@ -51,6 +53,7 @@ public class RedditRipperTest extends RippersTest {
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRedditGfyBadURL() throws IOException {
|
||||
RedditRipper ripper = new RedditRipper(
|
||||
new URL("https://www.reddit.com/r/bottesting/comments/7msmhi/bad_link/"));
|
||||
|
@ -14,6 +14,7 @@ public class RedgifsRipperTest extends RippersTest {
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testRedgifsGoodURL() throws IOException{
|
||||
RedgifsRipper ripper = new RedgifsRipper(new URL("https://www.redgifs.com/watch/talkativewarpeddragon-petite"));
|
||||
testRipper(ripper);
|
||||
@ -24,6 +25,7 @@ public class RedgifsRipperTest extends RippersTest {
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRedgifsBadRL() throws IOException{
|
||||
RedgifsRipper ripper = new RedgifsRipper(new URL("https://www.gifdeliverynetwork.com/foolishelasticchimpanzee"));
|
||||
testRipper(ripper);
|
||||
|
@ -21,10 +21,6 @@ public class RippersTest {
|
||||
|
||||
private final Logger logger = Logger.getLogger(RippersTest.class);
|
||||
|
||||
public void testStub() {
|
||||
Assertions.assertTrue(true, "RippersTest must contain at lease one test.");
|
||||
}
|
||||
|
||||
void testRipper(AbstractRipper ripper) {
|
||||
try {
|
||||
// Turn on Debug logging
|
||||
|
@ -5,10 +5,12 @@ import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.TheyiffgalleryRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TheyiffgalleryRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testTheyiffgallery() throws IOException {
|
||||
TheyiffgalleryRipper ripper = new TheyiffgalleryRipper(new URL("https://theyiffgallery.com/index?/category/4303"));
|
||||
testRipper(ripper);
|
||||
|
@ -5,16 +5,19 @@ import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.TwitterRipper;
|
||||
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TwitterRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testTwitterUserRip() throws IOException {
|
||||
TwitterRipper ripper = new TwitterRipper(new URL("https://twitter.com/danngamber01/media"));
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testTwitterSearchRip() throws IOException {
|
||||
TwitterRipper ripper = new TwitterRipper(
|
||||
new URL("https://twitter.com/search?f=tweets&q=from%3Aalinalixxx%20filter%3Aimages&src=typd"));
|
||||
|
@ -6,7 +6,7 @@ import java.net.URL;
|
||||
import com.rarchives.ripme.ripper.rippers.WordpressComicRipper;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class WordpressComicRipperTest extends RippersTest {
|
||||
@ -23,7 +23,7 @@ public class WordpressComicRipperTest extends RippersTest {
|
||||
// http://shipinbottle.pepsaga.com/?p=281
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI")
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
|
||||
public void test_totempole666() throws IOException {
|
||||
WordpressComicRipper ripper = new WordpressComicRipper(
|
||||
new URL("http://www.totempole666.com/comic/first-time-for-everything-00-cover/"));
|
||||
@ -31,14 +31,14 @@ public class WordpressComicRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI")
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
|
||||
public void test_buttsmithy() throws IOException {
|
||||
WordpressComicRipper ripper = new WordpressComicRipper(new URL("http://buttsmithy.com/archives/comic/p1"));
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI")
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
|
||||
public void test_themonsterunderthebed() throws IOException {
|
||||
WordpressComicRipper ripper = new WordpressComicRipper(
|
||||
new URL("http://themonsterunderthebed.net/?comic=test-post"));
|
||||
@ -72,13 +72,14 @@ public class WordpressComicRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI")
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
|
||||
public void test_freeadultcomix() throws IOException {
|
||||
WordpressComicRipper ripper = new WordpressComicRipper(
|
||||
new URL("http://freeadultcomix.com/finders-feepaid-in-full-sparrow/"));
|
||||
testRipper(ripper);
|
||||
}
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void test_delvecomic() throws IOException {
|
||||
WordpressComicRipper ripper = new WordpressComicRipper(
|
||||
new URL("http://thisis.delvecomic.com/NewWP/comic/in-too-deep/"));
|
||||
@ -110,7 +111,7 @@ public class WordpressComicRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI")
|
||||
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
|
||||
public void test_pepsaga() throws IOException {
|
||||
WordpressComicRipper ripper = new WordpressComicRipper(new URL("http://shipinbottle.pepsaga.com/?p=281"));
|
||||
testRipper(ripper);
|
||||
|
@ -7,6 +7,7 @@ import com.rarchives.ripme.ripper.rippers.XhamsterRipper;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
@ -32,6 +33,7 @@ public class XhamsterRipperTest extends RippersTest {
|
||||
testRipper(ripper);
|
||||
}
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testXhamsterAlbumDesiDomain() throws IOException {
|
||||
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster.desi/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664"));
|
||||
testRipper(ripper);
|
||||
|
Loading…
x
Reference in New Issue
Block a user