Empty test suite: /InstrumentationResultParser: test run failed: 'Instrumentation run failed due to 'java.lang.NullPointerException'' - robolectric

Initially, I wrote Android test cases. They worked absolutely fine. But after I tried Robolectric and then switched back to Android test framework, I started getting this error. However, after the error, I get the message Empty test suite.
The stacktrace:
12:47:08 I/RemoteAndroidTest: Running am instrument -w -r -e debug false -e class in.dash.dashapp.ApplicationTest in.dash.dashapp.test/android.test.InstrumentationTestRunner on Nexus_4_API_17_2 [emulator-5554]
12:47:08 I/InstrumentationResultParser: test run failed: 'Instrumentation run failed due to 'java.lang.NullPointerException''

Related

Appium Pagefactory throws noSuchMethodException when running from POM

When I try to run my appium scripts on the pom file ( with mvn verify or mvn test)
I get a
java.lang.RuntimeException: java.lang.NoSuchMethodException: jdk.proxy2.$Proxy12.proxyClassLookup()
On the line that instantiates my locators:
PageFactory.initElements(new AppiumFieldDecorator(driver, Duration.ofSeconds(15)), this);
When I run the test directly from InteliJ or run the testng.xml file, the test succeeds
Full pom.xml: https://pastebin.com/V0FbehMh
Full error stacktrace: https://pastebin.com/11TvTq7a
testng.xml: https://pastebin.com/8XZtCfRt
Related classes: https://pastebin.com/ynFizC9T
What can be the problem, when everything is fine running from test class / testng.xml, but suddenly failing when running with maven in command line
it's a bit embarrassing, (because i remembered I did this before)
After doing an mvn clean, and an mvn compile again,
Then the issue disappeared. something probably got stuck somewhere and needed a clean again..

Getting 'E/launcher - Error: spawn EACCES' error while trying to run protractor tests in Unix machine

I am getting below mentioned error while running the protractor tests in headless mode in Unix machine.
Thinking it might be due to some permission issue, I gave execute permission to 'protractor' file in protractor/bin folder and to the protractor conf file, but no help.
[12:27:50] I/launcher - Running 1 instances of WebDriver
[12:27:50] I/direct - Using ChromeDriver directly...
[12:27:50] E/launcher - spawn EACCES
[12:27:50] E/launcher - Error: spawn EACCES
at exports._errnpException (util.js:1024:11)
at ChildProcess.spawn(internal/child_process.js:325:11)
at Object.exports.spawn(child_process.js:493:9)
at exec (/Ruser1/home/user1/Project1/node_modules/protractor/node_modules/selenium-webdriver/io/exec.js:116:27
at resolveCommandLineFlags.then.args (/Ruser1/home/user1/Project1/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:219:25)
at <anonymous>
I tried running my tests from terminal as well as from jenkins using command:
./node_modules/protractor/bin/protractor config/test1_cucumber.conf
But getting the same error. I have set directConnect=true in my conf file and passing --headless in chromeOptions.

Error to build a signed apk

i'm trying to build an signed apk with visual studio /Cordova template. But i'm receiving this error: ERROR building one of the platforms 1
And : Error MDAVSCLI 1
I´m following this tutorial:
http://taco.visualstudio.com/en-us/docs/tutorial-package-publish-readme/
and my Keystore is like image bellow:
-package-resources:
[aapt] Creating full resource package...
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating MainActivity-release-unsigned.apk for release...
-post-package:
-release-prompt-for-password:
-release-nosign:
-release-sign:
[echo] Signing final apk...
BUILD FAILED
C:\Users\Leo\AppData\Local\Android\sdk1\tools\ant\build.xml:1135: The following error occurred while executing this line:
C:\Users\Leo\AppData\Local\Android\sdk1\tools\ant\build.xml:1147: C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\"my-release-key.Keystore" (The file name syntax, the name of the directory or volume label incorrect)
Total time: 52 seconds
Picked up _JAVA_OPTIONS: -Xmx512M
C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant release -f C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
Command finished with error code 1: C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\cordova\build.bat --release
ERROR building one of the platforms : error : C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
MDAVSCLI : error : C:\Users\Leo\Desktop\Mobile\Mooobile\platforms\android\c
I've found a way : removing the quotes in my ant.properties i can build.

Assertion failure when using puphpet

I am trying to use the hhvm, but then i try and run my test script i get an 502 Bad Gateway (nginx) error message
so i tried to run it in terminal and i get the following error message:
$ hhvm /var/www/public/test.php
Assertion failure: /tmp/tmp.3Ty7dCXWJ2/hphp/runtime/base/rds.cpp:426: void HPHP::rds::initPersistentCache(): assertion `s_tc_fd != -1' failed.
Aborted
but when i run it using sudo it works!
$ sudo hhvm /var/www/public/test.php
hello world
What did i do wrong? i have tried updating the owner of a file and changed the permissions of hhvm, but this didn't work.
You shouldn't be getting assertion failures in a release build of HHVM. Can you please file an issue on GitHub so we can track the bug? Make sure to include your OS as well as the output of hhvm --version.

set phpstorm working

I'm trying to configure correctly phpstorm but I receive this error:
/Applications/MAMP/bin/php/php5.3.6/bin/php/private/var/folders/k9/kwf7lc153rngm1ky4_3948sc0000gn/T/ide-phpunit.php --no-configuration /Applications/MAMP/htdocs/FirstAid_jquerymobile
Testing started at 21:17 ...
Process finished with exit code 255
I installed phpunit but I don't even know which could be the error?
Usually PhpStorm produces this error when PHPUnit fails with fatal - check the PHP error log or run PHPUnit directly from CLI - it will help to localize the problem.

Resources