Better error reporting for Android JUnit4 test runner? - junit4

I am using AndroidJUnit4 as my test runner for android espresso and uiautomator test. The html report generated gives no stack trace information or custom error messages. Is there a way to get detailed report?

./gradlew app:connectedAndroidTest

Related

Working Chainway C72 UHF sample code for Android 11 version

From what I can gather Chainway changed the API to their hardware library with the move from Android 7 to Android 11 causing almost all the current packages for different frameworks out there to no longer work. Does anyone have working sample code for the Chainway C72 running on Android 11 other than this buggy Android Studio sample project? Biggest preference would be Xamarin/Maui or Flutter, but honestly any stable code would be greatly appreciated.
What we've tried:
We have noticed that most of the libraries use a deprecated API class called RFIDWithUHF.
We contacted Chainway technical support and they provided us with firmware update files and mentioned that we should use RFIDWithUHFUart class instead. They provided an Android Studio sample project, if you restart the device and run the project you are able to scan RFID tags, but it is extremely buggy and quickly crashes. Closing the app and restarting it unfortunately does not recover it from this state even though the code does a free and initialise on startup. You have to reboot the device to get it out of this state.
We attempted to use the following packages/libraries with the following results:
Using these three Nuget packages on Xamarin 1 2 3 - Initialize method always return false and we're unable to scan tags
Using this flutter package - We got the following printouts on our console:
An Observatory debugger and profiler on C72 is available at: http://127.0.0.1:61316/iEK5kGMghqQ=/
The Flutter DevTools debugger and profiler on C72 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:61316/iEK5kGMghqQ=/
I/DeviceAPI_DeviceCon(30538): getDeviceInfoFromFile configPath=/storage/emulated/0/PDAConfig.txt
D/DeviceAPI_DeviceCon(30538): cw.model2:
D/DeviceAPI_DeviceCon(30538): cw.model:mtk.6765.c72
D/DeviceAPI_DeviceCon(30538): 最终cw.model:mtk.6765.c72
I/DeviceAPI_DeviceCon(30538): model=C72,uartPath=/dev/ttyMT3,uartPath_Fingerprint=/dev/ttyMT0,uartPath_RFID=
I/DeviceAPI_DeviceCon(30538): getModel() model=C72
D/DeviceAPI(30538): UHF device = C72
D/DeviceAPI(30538): UHF_Init----------->DevIsOpen = 1
D/DeviceAPI(30538): UHF uart = /dev/ttyMT3
D/DeviceAPI_SerialPort(30538): [SerialPort_Open] [2]: No such file or directory
D/DeviceAPI(30538): UHF uhf_uart_fd = -1
I/DeviceAPI_UHF(30538): init() Uart = /dev/ttyMT3
E/DeviceAPI_UHF(30538): init() err UHFOpenAndConnect result:-1
E/DeviceAPI_UHF(30538): startInventory() err :-1
This react package - Get the following build error:
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Repos\Sandbox\ReactNative\c72ScannerReact\node_modules\c72-rfid-scanner\android\build.gradle' line: 23
* What went wrong:
A problem occurred evaluating project ':c72-rfid-scanner'.
> Plugin with id 'maven' not found.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':c72-rfid-scanner'.
> compileSdkVersion is not specified. Please add it to build.gradle
We've also tried all the example code here with no luck either.
I am also looking at the same device (Xamarin). I was not able to get the samples online working, but after contacting tech support I received working sample code.

Not able to run builds on travis after using SPM plugin

Getting following error when running builds having any SPM plugin like SwiftGenPlugin:
The following build commands failed:
Validate plug-in “SwiftGenPlugin” in package “swiftgenplugin”
Build link: https://app.travis-ci.com/github/mukesh-mt/SwiftGenTest/jobs/592013507
Sample project: https://github.com/mukesh-mt/SwiftGenTest
I was able to solve this issue by using -skipPackagePluginValidation option in xcodebuild.
With fastlane you can pass it with --xcargs "-skipPackagePluginValidation" option in gym command
See this build https://app.travis-ci.com/github/mukesh-mt/SwiftGenTest/builds/259435024

How do you compile a flutter application?

I'm seeing that I can introduce a compilation error in my dart code but flutter build ios will still successfully run. If I flutter run -d [my-simulator] the compile error will immediately be presented in a red screen on the simulator but I can't currently easily do this in a CI type check.
Is there are cli command I can run to ensure that all of the dart code is free of compile errors?
You can run dart analyze or flutter analyze commands.
More info

Make Flutter Web Sentry error report readable?

Flutter Web error report sent to Sentry is not readable because is minified.
https://github.com/flutter/flutter/issues/37875
https://github.com/flutter/flutter/issues/16883#issue-316793104
I am use: https://pub.dev/packages/sentry
How I can make report not minify so I can read?
Give this a try:
When you build your app, use the --source-maps option to enable building the source maps:
flutter build web --source-maps
Then, upload the source maps to Sentry using the command line interface:
sentry-cli releases files "myapp-1.0.0+1" upload-sourcemaps /Users/me/myapp/build/web

Flutter sample build issue

I am getting this error when trying to run the sample first_app in flutter after opening it in VS CODE.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/ts/Documents/Dev/first_app/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar
detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone 8.
Does anyone know what could be causing this? Thanks!