Automated testing chrome bluetooth api - web-bluetooth

Has anyone done automated testing with selenium (or any other framework) for their webapps that utilize the chrome bluetooth api? I've seen people use adb to facilitate but i would love to be able to simulate a device connection in code.

Consider replacing the browser implementation with a testing implementation of the API.

Related

WebSocket in browser with true back-pressure

I learned the hard way that the browsers' WebSocket API does not support back-pressure. Is there a way to work around this limitation without having to manually implement control flow on the application layer protocol? Would it for example be possible to implement a full WebSocket client in WASM, instead of having to proxy everything through the browser's API?
Back-pressure: no changes to the protocol that are addressing this issue are published to this time.
WebAssembly: there is no access to the WebSocket API (or any other) at this time from a pure WebAssembly module. You will have to use JavaScript in one way or another.

How to record actions using JMeter, using wired connection?

I have followed most of the JMeter tutorials, but there's one thing that prevents me from testing our app specially iOS. I can't be in one network. We have a separate network for both Mobile and Desktop/Laptop. Is there any way that I can record JMeter using Wired Connection, instead of WiFi? Thanks!
If you have to use JMeter for recording mobile device activity you could go for USB Tethering, this way your computer becomes connected to the iOS device network hence JMeter should be able to capture the traffic.
An easier option would be going for BlazeMeter Proxy Recorder, as a bonus you will have possibility to export recorded scripts in "SmartJMX" mode with automatic detection and correlation of the dynamic parameters.

BLE: LE Secure Connection with Xamarin

We're talking about BLE. Right now Im using the Plugin.BLE library and it's working quite fine. Now Im in the need of using the LE Secure Connection (with the "just works" method) in order to send/receive encrypted data.
I've read lots of documentation about how the protocol works, but have no idea of how actually implementing it in Xamarin and wasn't able to find anything on this.
With the Plugin.BLE one can take advantage of a very simple APIs to connect to a Device.
Is there any library that provides similar simplicity and enabling an LE Secure Connection?
If not, how can I connect in Android & iOS to a BLE device using a secure channel?
Thank you very much
The pairing is handled by the Bluetooth stack and not by the application, so you can't affect this in any way. However, from Marshmallow and onward, BLE pairing will use Secure Connections as long as the second device supports it. Not sure about iOS.

How to detect connections made by the browser from a Firefox add-on?

I'm trying to develop an extension that detects every connection made by the browser to figure out the URLs being accessed. I know that this is possible via writing an HTTP/SOCKS proxy and configuring the browser to flow traffic via that. However, that's kind of overkill for the application that I'm trying to develop and it's best done as a Firefox Add-on if that's possible. Any clues/pointers would be highly appreciated.
Use nsIHttpActivityDistributor and there is many information about the http transaction and socket transport through observeActivity callback.
Read the official documentation https://developer.mozilla.org/en/Monitoring_HTTP_activity.

Testing network unavailability on Windows Phone 7

I developing an app which connects to my webserver. During development I have the webserver and phone emulator on the same machine.
How can I test how my app behaves when there's no network connectivity? Are there test hooks on the emulator? Should I use Fiddler to fake timeouts? I don't see any test hooks on the GetIsNetworkAvailable() call...
Thanks,
The approach I've used is to wrap the appropriate methods in my own NetworkService class, this lets me switch out the code with a Stub version during unit tests and integration tests on the emulator.
The NetworkInterface.NetworkInterfaceType offers a enumeration that contains the network currently servicing internet requests. It will return 'none' if there isn't a internet connection available. (unfortunately it doesn't provide health information on the nature of the connection available, so if you have poor coverage it will still return MobileBroadbandGSM)
You can find the full information on the NetworkInterfaceType enumeration here

Resources