带有酱实验室连接的selenium web驱动程序中的java.lang.reflect.InvocationTargetException

时间:2018-05-14 07:10:04

标签: selenium

[RemoteTestNG] revisions:
  git.commit.id=f7160ab
  git.branch=f7160ab041ae763e01e10b6867b5d40d49e2688e
  git.build.version=1.3.1
[RemoteTestNG] loaded class org.testng.internal.Version at file:/C:/Users/Dynamisch%20Lap/.p2/pool/plugins/org.testng_6.14.2.r201802161450.jar
[RemoteTestNG] detected TestNG version 6.14.2
[RemoteTestNG] Invoked with -serport 53913 -protocol json -d 

测试基类

[BaseMessageSender] Waiting for Eclipse client on localhost:53913
[BaseMessageSender] Received a connection from Eclipse on localhost:53913
[BaseMessageSender] Connection established, starting reader thread
[BaseMessageSender] ReaderThread waiting for an admin message
[JsonMessageSender] Sending message [GenericMessage ==> suiteCount:1, testCount:1]
[BaseMessageSender] ReaderThread received admin message:>ACK
[BaseMessageSender] Admin message:>ACK
[BaseMessageSender] Received ACK:>ACK
[BaseMessageSender] Admin message:>ACK
[BaseMessageSender] Received ACK:>ACK
org.testng.TestNGException: 
Cannot instantiate class com.TectCase.qa.packag.SelectSurveyPageTest
  at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:30)
  at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:423)
  at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:336)
  at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:125)
  at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:190)
  at org.testng.TestClass.getInstances(TestClass.java:95)
  at org.testng.TestClass.initTestClassesAndInstances(TestClass.java:81)
  at org.testng.TestClass.init(TestClass.java:73)
  at org.testng.TestClass.<init>(TestClass.java:38)
  at org.testng.TestRunner.initMethods(TestRunner.java:389)
  at org.testng.TestRunner.init(TestRunner.java:271)
  at org.testng.TestRunner.init(TestRunner.java:241)
  at org.testng.TestRunner.<init>(TestRunner.java:192)
  at org.testng.remote.support.RemoteTestNG6_12$1.newTestRunner(RemoteTestNG6_12.java:33)
  at org.testng.remote.support.RemoteTestNG6_12$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_12.java:66)
  at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:713)
  at org.testng.SuiteRunner.init(SuiteRunner.java:260)
  at org.testng.SuiteRunner.<init>(SuiteRunner.java:198)
  at org.testng.TestNG.createSuiteRunner(TestNG.java:1295)
  at org.testng.TestNG.createSuiteRunners(TestNG.java:1273)
  at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
  at org.testng.TestNG.runSuites(TestNG.java:1049)
  at org.testng.TestNG.run(TestNG.java:1017)
  at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
  at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
  at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:24)
  ... 25 more
Caused by: java.lang.NullPointerException
  at com.base.packag.TestBase.<init>(TestBase.java:34)
  at com.TectCase.qa.packag.SelectSurveyPageTest.<init>(SelectSurveyPageTest.java:26)
  ... 30 more
java.net.SocketException: Socket closed
  at java.net.SocketInputStream.socketRead0(Native Method)
  at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
  at java.net.SocketInputStream.read(SocketInputStream.java:171)
  at java.net.SocketInputStream.read(SocketInputStream.java:141)
  at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
  at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
  at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
  at java.io.InputStreamReader.read(InputStreamReader.java:184)
  at java.io.BufferedReader.fill(BufferedReader.java:161)

控制台

  
capabilities.setCapability("noReset", true);

C:\ Users \ Dynamisch Lap \ eclipse-workspace \ PeerTest_Maven \ test-output

C:\用户\ DYNAMI〜1 \应用程序数据\本地\ TEMP \ TestNG的-蚀 - 1591506395 \ TestNG的-customsuite.xml

SELECT
    t1.date,
    t1.user_id,
    t1.timestamp,
    DATEDIFF(t1.date, t2.first_date) AS diff
FROM yourTable t1
INNER JOIN
(
    SELECT user_id, MIN(date) AS first_date
    FROM yourTable
    GROUP BY user_id
) t2
    ON t1.user_id = t2.user_id
ORDER BY
    t1.user_id,
    t1.date;

0 个答案:

没有答案