Not able to execute the test cases for iOS.
rohanpeshwe opened this issue · 4 comments
Hi,
I am trying to execute the test cases for the iPhone 7 simulator by using following command,
functional-tests-demo: mvn clean test -P nativeapp.sim.iphone7.ios10
but I am getting following error,
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building functional.tests 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ functional.tests ---
[INFO] Deleting /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ functional.tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ functional.tests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ functional.tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ functional.tests ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/target/test-classes
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default-test) @ functional.tests ---
T E S T S
Running TestSuite
Tests run: 4, Failures: 2, Errors: 0, Skipped: 2, Time elapsed: 45.856 sec <<< FAILURE! - in TestSuite
beforeSuiteUIBaseTest(nativeapp.tests.SmokeTests) Time elapsed: 32.257 sec <<< FAILURE!
java.lang.RuntimeException: Appium server not running!
afterSuiteUIBaseTest(nativeapp.tests.SmokeTests) Time elapsed: 40.767 sec <<< FAILURE!
java.lang.NullPointerException
Results :
Failed tests:
SmokeTests>UIBaseTest.afterSuiteUIBaseTest:187 » NullPointer
SmokeTests>UIBaseTest.beforeSuiteUIBaseTest:95 » Runtime Appium server not run...
Tests run: 4, Failures: 2, Errors: 0, Skipped: 2
[ERROR] There are test failures.
Please refer to /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/target/surefire-reports for the individual test results.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (default) @ functional.tests ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
main:
[mkdir] Created dir: /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/target/surefire-reports/html
[xslt] Processing /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/target/surefire-reports/testng-results.xml to /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/target/surefire-reports/html/index.html
[xslt] Loading stylesheet /Users/rohanpeshwe/Desktop/appiumTest/functional-tests-demo/resources/report/testng-results.xsl
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.624 s
[INFO] Finished at: 2017-04-19T18:38:54+05:30
[INFO] Final Memory: 22M/170M
[INFO] ------------------------------------------------------------------------
I have followed all the steps provided on the blog,
https://www.nativescript.org/blog/nativescript-open-source-functional-testing-framework
I have just tweaked some configs because my xcode's version is 8.2.1 and updated configs are as follows:
appiumVersion=1.6.3
platformName=iOS
deviceName=iPhone 7 102
platformVersion=10.2
testAppName=TestApp.app
testAppArchive=nativeapp.tgz
deviceType=Simulator
simulatorType=iPhone 7
Node version
v6.9.5
Appium Version
1.6.3
Java version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Can somebody please point me the right direction and let me know if something is missing by my side.
Hey @rohanpeshwe,
could you please share all logs from the target/surefire-reports/logs folder?
Hi Vasil,
Please find the zip of logs folder here.
Hey @rohanpeshwe,
Thanks a lot for the logs.
I am afraid that based on them I could not guess what causes the problem.
Could you please add this entry appiumLogLevel=debug to the resources/config/nativeapp/nativeapp.sim.iphone7.ios10.properties config (for example) and try again.
This should give us detailed Appium log and make clear why the server is not running, if so.