Cypress test results do not appear in reportportal - testing

I'm using "cypress": "^8.7.0" and "#reportportal/agent-js-cypress": "^5.0.2" with node 14
My reportportal implementation is already running well with testcafe for another project. Now I tried setting it up with this project that uses cypress and the results just don't show up in RP. I followed every step shown here:
https://github.com/reportportal/agent-js-cypress
I turned on the debug option in the reporter options and I'm getting this output:
Finish test item ...
Success finish item ...
Finish test item ...
Success finish item ...
Finish launch ...
Success finish launch ...
This sounds like the launch worked but I do not see anything in RP. Does anyone have an idea what I'm missing?

Try adding /api/v1 at the end of your endpoint.
For example:
endpoint=https://reportportal.com/api/v1
I was facing the same issue with similar debug logs. Adding /api/v1 in the endpoint solved the problem for me.
Note - agent-js-cypress is not yet supported with Cypress 10.0 or above. Details https://github.com/reportportal/agent-js-cypress/issues/116

Related

Jest failed tests no longer provide failure info, only `maxLength` error

In my project we had Jest running just fine and as far as I know no test dependencies were changed. When tests would fail it would log out the details of what was expected versus what was received. But if I have a failing test now (or try to make it fail like the following example) all I get is an error around pretty-format options:
when provided no parameters other than text › default values are set correctly
pretty-format: Unknown option "maxWidth".
48 |
49 | it('default values are set correctly', async () => {
> 50 | expect(element.variant).toBe('primarzy');
It should be telling me that it expected "primarzy" (misspelled on purpose) but got "primary". This is happening no matter which test suite has a failed test.
So for anyone else who encounters this, apparently different packages in my test dependencies were trying to run different versions of pretty-format breaking failed test output. The fix for me was just manually installing pretty-format:
npm i pretty-format --save-dev
Everything works fine after that.

Test Failing after upgrade from 0.2.7 to 0.6.1

After upgrading from 0.2.7 to 0.6.1, I am seeing a test failure when running from gradle.
The failing test is a simple:
And match response.dispositionInstructions == "Disposition Instructions"
When I run from intellij, the test passes.
Running from gradle, the following is logged:
15:11:22.840 [DEBUG] [TestEventLogger] com.intuit.karate.exception.KarateException: path: $.dispositionInstructions, actual: '{"dispositionInstructions":"Disposition Instructions", rest of document omitted}’ , expected: 'Disposition Instructions', reason: not equal
Not sure if it is relevant, but the JSON document is over 94k long.
However, if I paste the document (from the log) into a JSON validator (jsonlint.com), it shows it as being valid.
I am keen to exploit the new functionality and this is the only issue blocking me.
Any suggestions as to why this is failing on 0.6.1?
Dev of Karate here. Thanks for the clear explanation of the issue !
My guess is that this is related to this particular issue: https://github.com/intuit/karate/issues/144
Unfortunately, the person who logged that issue never reverted. I really hope that the suggested tweak to the surefire plugin to set the file.encoding does the trick.
Else do log an issue and cross-refer the above issue so that a notification goes out to the OP for that one. With your help I can hopefully finally replicate this issue, and I may need your help to create a fake large payload that can simulate this problem in my local environment.

calabash-android run app-debug.apk throws exception

I am trying to run calabash-android to test my app, but I get the following error, the same app without any modification was working before I tried to do some modifications, but then I reverted all the modifications to the app :
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.bitbar.testdroid
at com.android.server.pm.Settings.isOrphaned(Settings.java:4134)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18091)
at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15508)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
at android.os.ShellCommand.exec(ShellCommand.java:94)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18349)
at android.os.Binder.shellCommand(Binder.java:468)
at android.os.Binder.onTransact(Binder.java:367)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3031)
at android.os.Binder.execTransact(Binder.java:565)
And then
Success
Success
Scenario: I can choose a file from the Gallery # features/my_first.feature:3
HTTPClient::KeepAliveDisconnected: Connection reset by peer # io_fillbuf - fd:8 (HTTPClient::KeepAliveDisconnected)
./features/support/app_life_cycle_hooks.rb:5:in `Before'
When I take a screenshot # calabash-android-0.9.0/lib/calabash-android/steps/screenshot_steps.rb:9
Then I take a screenshot # calabash-android-0.9.0/lib/calabash-android/steps/screenshot_steps.rb:9
Failing Scenarios:
cucumber features/my_first.feature:3 # Scenario: I can choose a file from the Gallery
1 scenario (1 failed)
2 steps (2 skipped)
0m6.240s
Exception ScreenShot
I solved the problem by running the build using the gradle task :app:assembleDebug
in the exception above, calabash can't find the package name, because it is on another dex class.
I think in calabash, they may be having problem with multidex projects, and Android Studio will always enable multidex to your app, even if it doesn't need it.
I am not an expert, any suggestion are welcome, and I hope some people can benefit from this answer.

Javascript console.log vs Durandal system.log

console.log vs Durandal system.log
i am trying to understand if they are a like,
I believe that they both gives the same output - logs in the console
Am i missing something?
You're right. They give the exact same output except that system.log can be disabled. It will also work with most if not all browsers.
As mentioned in the documentation for system.log:
Logs data to the console. Pass any number of parameters to be logged. Log output is not processed if the framework is not running in debug mode.
Debug mode is enabled using system.debug.
You can view the source code of system.log on Github.

Could not copy the file "resources.dll" because it was not found

I'm getting this error after clicked for the first time in TEST-> Debug -> All Tests
I've been looking and seen something to add Pre build events but it didn't worked out, the error code:
Error 1 Could not copy the file "obj\Debug\qps-ploc\Bigbuilder.resources.dll" because it was not found. Bigbuilder
The program doesn't debug at the first try but when it asks "there was build errors. Would you like to run the last successfull build?" if i click no and retry to execute it will say nothing but the error will mantain in the error list
Uninstall the Multilingual App Toolkit from Programs and Features, download the latest version, and re-install. This fixes the build issues.
Encountered the same problem with building a console application using the Multilingual App Toolkit in a Portable Class Library, and now it is working.