diff --git a/tests/integrationtests/archives/test-multi-files.tar b/tests/integrationtests/archives/test-multi-files.tar
new file mode 100644
index 00000000..fa144842
Binary files /dev/null and b/tests/integrationtests/archives/test-multi-files.tar differ
diff --git a/tests/integrationtests/archives/test.tar b/tests/integrationtests/archives/test.tar
new file mode 100644
index 00000000..11718684
Binary files /dev/null and b/tests/integrationtests/archives/test.tar differ
diff --git a/tests/integrationtests/archives/test.tar.gz b/tests/integrationtests/archives/test.tar.gz
new file mode 100644
index 00000000..ec21a750
Binary files /dev/null and b/tests/integrationtests/archives/test.tar.gz differ
diff --git a/tests/integrationtests/archives/test.zip b/tests/integrationtests/archives/test.zip
new file mode 100644
index 00000000..a75ab243
Binary files /dev/null and b/tests/integrationtests/archives/test.zip differ
diff --git a/tests/integrationtests/tst_perfparser.cpp b/tests/integrationtests/tst_perfparser.cpp
index e56003e8..d54c898e 100644
--- a/tests/integrationtests/tst_perfparser.cpp
+++ b/tests/integrationtests/tst_perfparser.cpp
@@ -816,6 +816,30 @@ private slots:
 
         QCOMPARE(decompressed.readAll(), QByteArrayLiteral("Hello World\n"));
     }
+
+    void testArchive_data()
+    {
+        QTest::addColumn<QString>("filename");
+
+        QTest::addRow("uncompressed tar") << QFINDTESTDATA("archives/test.tar");
+
+        QTest::addRow("gzip compressed tar") << QFINDTESTDATA("archives/test.tar.gz");
+
+        QTest::addRow("zip file") << QFINDTESTDATA("archives/test.zip");
+
+        QTest::addRow("tar file with multiple files") << QFINDTESTDATA("archives/test-multi-files.tar");
+    }
+
+    void testArchive()
+    {
+        QFETCH(QString, filename);
+
+        PerfParser parser;
+        QFile decompressed(parser.decompressIfNeeded(filename));
+        decompressed.open(QIODevice::ReadOnly);
+
+        QCOMPARE(decompressed.readAll(), QByteArrayLiteral("Hello World\n"));
+    }
 #endif
 
 private: