diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp
index 357cef89a2f213df726e102ab0cd759355869f5c..b05d7d05fc437d90e3d28ff79a6792506194a1eb 100644
--- a/tests/auto/qserialport/tst_qserialport.cpp
+++ b/tests/auto/qserialport/tst_qserialport.cpp
@@ -164,10 +164,24 @@ void tst_QSerialPort::initTestCase()
     m_senderPortName = QString::fromLocal8Bit(qgetenv("QTEST_SERIALPORT_SENDER"));
     m_receiverPortName = QString::fromLocal8Bit(qgetenv("QTEST_SERIALPORT_RECEIVER"));
     if (m_senderPortName.isEmpty() || m_receiverPortName.isEmpty()) {
+        static const char message[] =
+              "Test doesn't work because the names of serial ports aren't found in env.\n"
+              "Please set environment variables:\n"
+              " QTEST_SERIALPORT_SENDER to name of output serial port\n"
+              " QTEST_SERIALPORT_RECEIVER to name of input serial port\n"
+              "Specify short names of port"
+#if defined(Q_OS_UNIX)
+              ", like: ttyS0\n";
+#elif defined(Q_OS_WIN32)
+              ", like: COM1\n";
+#else
+              "\n";
+#endif
+
 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-        QSKIP("Test doesn't work because the names of serial ports aren't found in env.");
+        QSKIP(message);
 #else
-        QSKIP("Test doesn't work because the names of serial ports aren't set found env.", SkipAll);
+        QSKIP(message, SkipAll);
 #endif
     } else {
         m_availablePortNames << m_senderPortName << m_receiverPortName;
diff --git a/tests/auto/qserialportinfo/tst_qserialportinfo.cpp b/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
index afbcf0b0441435eb95d558bd613298492ee0dbd3..e421aa410c267fdf30b3aa91462df9f2bcc3104f 100644
--- a/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
+++ b/tests/auto/qserialportinfo/tst_qserialportinfo.cpp
@@ -70,10 +70,23 @@ void tst_QSerialPortInfo::initTestCase()
     m_senderPortName = QString::fromLocal8Bit(qgetenv("QTEST_SERIALPORT_SENDER"));
     m_receiverPortName = QString::fromLocal8Bit(qgetenv("QTEST_SERIALPORT_RECEIVER"));
     if (m_senderPortName.isEmpty() || m_receiverPortName.isEmpty()) {
+        static const char message[] =
+              "Test doesn't work because the names of serial ports aren't found in env.\n"
+              "Please set environment variables:\n"
+              " QTEST_SERIALPORT_SENDER to name of output serial port\n"
+              " QTEST_SERIALPORT_RECEIVER to name of input serial port\n"
+              "Specify short names of port"
+#if defined(Q_OS_UNIX)
+              ", like 'ttyS0'\n";
+#elif defined(Q_OS_WIN32)
+              ", like 'COM1'\n";
+#else
+              "\n";
+#endif
 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-        QSKIP("Test doesn't work because the names of serial ports aren't found in env.");
+        QSKIP(message);
 #else
-        QSKIP("Test doesn't work because the names of serial ports aren't set found env.", SkipAll);
+        QSKIP(message, SkipAll);
 #endif
     } else {
         m_availablePortNames << m_senderPortName << m_receiverPortName;