when I try to build a prod profile war, with mvn -Pprod package, I am getting this gulp error :
TypeError: undefined is not an object (evaluating '$httpBackend.verifyNoOutstandingExpectation') in /home/myapp/dev/workspace/applicationRh/src/test/javascript/spec/app/services/auth/auth.services.spec.js (line 9)
/home/myapp/dev/workspace/applicationRh/src/test/javascript/spec/app/services/auth/auth.services.spec.js:9:1596
PhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) (0 secs / 1.231 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) ERROR (2.671 secs / 1.231 secs)
[22:28:40] 'test' errored after 9.84 s
[22:28:40] Error: 1
at formatError (/usr/lib/node_modules/gulp/bin/gulp.js:169:10)
Does anyone know about this issue?
You can't package your app in production if it has test failures. Run grunt test to see which test fail, and correct that test.
Of course, if you don't want to be bothered with tests, just delete them :-)
Related
dcl deploy
secp256k1 unavailable, reverting to browser version
× Build /scene in production mode failed
Error: dcl deploy Error: Error while building the project, run "dcl help deploy" for more info.
I get this error whenever I run "dcl deploy". Moreover, I tried it with --skip-build and it works fine though the --skip-build also show an error:
√ Building scene in production mode
√ Deployment structure created.
× Invalid scene.json: should NOT have additional properties
You need to sign the content before the deployment:
√ Validating scene.json
Here are the screenshots:
enter image description here
I am currently trying to get my Instrumentation tests to run using GitHub Actions. I have the unit tests running fine but I cannot seem to get the Espresso tests to run. I am currently trying:
- name: Run Instrumentation Tests (reactivecircus)
uses: reactivecircus/android-emulator-runner#v2.6.1
with:
api-level: 23
target: default
arch: x86
profile: Nexus 6
script: ./gradlew connectedCheck --stacktrace
And I get the result:
com.balsdon.ratesapp.behaviour.RateListActivityEntryBehaviourInstrumentedTest > recyclerViewClickOnItemChangesMain[test(AVD) - 6.0] FAILED
android.content.res.Resources$NotFoundException: Resource ID #0x7f0700d3
at android.content.res.Resources.getValue(Resources.java:1351)
Tests on test(AVD) - 6.0 failed: Instrumentation run failed due to 'android.content.res.Resources$NotFoundException'
> Task :app:connectedOfflinemockDebugAndroidTest FAILED
> Task :app:processOnlineecbDebugAndroidTestResources
> Task :app:processProductionDebugAndroidTestResources
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:connectedOfflinemockDebugAndroidTest'.
> There were failing tests. See the report at: file:///Users/runner/runners/2.165.2/work/currency_list_app/currency_list_app/app/build/reports/androidTests/connected/flavors/OFFLINEMOCK/index.html
and when I use:
- uses: malinskiy/action-android/emulator-run-cmd#release/0.0.5
with:
cmd: ./gradlew integrationTest
api: 23
tag: default
abi: x86
I get
/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
error: device 'emulator-5554' not found
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
If you want to see all my attempts, you can see all the commits on my pull request
Your emulator version that you run locally, it's most likely newer than API 23 android version. On github actions script you're running the emulator using API 23:
uses: reactivecircus/android-emulator-runner#v2
with:
api-level: 23
target: default
arch: x86
profile: Nexus 6
script: ./gradlew connectedCheck --stacktrace
and inside your project there is a app/src/main/res/drawable-v24 inside resources, thus it wont be available for emulators with < 24 API version. You either have to change that directory to be drawable-v23 or you move the resources to an other drawable that older versions can access.
Even if you change the drawable directory to drawable-v23, Espresso may have issues. You'll either have to resolve for that version or you'll have to use a newer API version for your GitHub action emulator, maybe the same as you have on your development environment.
I am developing project with laragon on windows 10 , i have installed phpunit 6.2 via composer. when i run phpunit command to run test in laravel project the following error occured
Warning: is_dir() expects parameter 1 to be a valid path, object given in C:\Users\ddw14\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Runner\BaseTestRunner.php on line 56
Recoverable fatal error: Object of class PHPUnit\Framework\TestSuite could not be converted to string in C:\Users\ddw14\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Runner\StandardTestSuiteLoader.php on line 32
what could be the problem ?
I have config and specs files at shared folder of remote server. I run tests from local machine via console:
C:\Users\User>protractor \remoteServer\AutoSPA\config\protractor.conf.js
With jasmine framework all works good, but if I set framework: 'jasmine2' in protractor.conf.js tests don`t run:
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://10.17.175.168:50910/wd/hub
Started
No specs found
Finished in 0.001 seconds
Uncaught exception: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
[launcher] Process exited with error code 1
EXAMPLE:
conf.js:
exports.config = {
specs: ['./test.js'],
capabilities : {'browserName' : 'chrome'},
framework: 'jasmine2',
jasmineNodeOpts: {showColors: true}
};
test.js in the same folder:
describe("test", function(){
it("navigate", function(){
browser.get("https://angularjs.org/")
})
});
if it's local folder it works correctly, but if it's remote folder it doesn't find spec test.js.
I investigated and debug a little bit more and found out that Jasmine 1.3 used FS and Path for specs search, but Jasmine 2 used GLOB. Glob doesn't work with remote paths.
For some reason I'm getting intermittent failure to run (or at least report the running of) my jasmine tests. the error lies in run-jasmine.js and the error manifests itself as
`TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')
phantomjs://webpage.evaluate():58
phantomjs://webpage.evaluate():61`
I am running TeamCity 8.1.3 (build 30101), Jasmine 2.2.0 and phantomjs 2.0.0.
Build step command parameters are
--web-security=no
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes
jasmine/run-jasmine.js
specs/SpecsRunner.html
I've tried downgrading Jasmine and phantomjs but no change. I've also tried various run-jasmine.js scripts but to no avail. Is anyone else having a similar problem?
Everything was fine until a few days ago and now it happens 90% of the time.
Thanks in advance.
I've found a new run-jasmine.js script that does the job.
daniel-chambers / run-jasmine.js
I tried this script before but was getting a problem with timeouts so I moved on but now I've increased the 'Default Max Timeout' in the script to 60 seconds, it seems to do the trick just fine.