2.6 KiB
NFC test SDK comparison
A comparison of the SDKs exposed to manage NFC tags on Android IOs and Python module PyNFC.
Overview
A comparison which analyses NFC use cases on mobile, as background to the test case design/implementation in the comissioning workflow :NFC-Bluetooth-pairing application.
- Analyse the Apple API
- Analyse the Android API
- Python test pynfc modules
Comparison
From the lowest level, each programmer interface has a definition for Errors, Link, NDEF, Tags and Sessions. Note: Comparisons are high level and use past experience and old docs.
IOS (objective C)
-
Errors: are a struct with 3 members:
int:value,
struct:string:usererror
struct:string:localized -
isodep:
not supported
-
NDEF support parameters with
payload
and Typename, -
Tags:
Are an Object representing tag
-
Sessions are managed using
Delegate &callbacks
Android (Java)
-
Errors:
thrown as IOException with cause and message, there are no returned error datas
-
isodep:
get/set communication parameters and RAW.
-
NDEF:
Includes SNEP
-
Tags :
(3)A,(3)B,(4)F,V and isoDep layer
-
Sessions
Intents and Actions, runtime registration of PendingIntent() allows hooking using tag filters
pynfc (python)
-
Errors :
raises Exceptions nfc.clf.Error and others per class
-
isodep:
get/set communication parameters and RAW.
-
NDEF:
full implementation and types. Includes SNEP
-
Tags :
1,2,(3)A,(3)B,(4)F isoDep layer
-
Sessions :
using delegate class callbacks
Observe
Negative test cases would be better designed around the user cases, than around the implementations, base error conditions at the API layer look more like
- UnsupportedTarget
- Communication
- Protocol
- (w) Transmission
- (w) Timeout
- (w) BrokenLink
- ValueError
Valuable test data cases shall be for valid and boundary cases for the smartposter NDEF record:
- uri – URI string ASCII only
- title – Smart poster title(s), (additional internationalizations with IANA codes not tested)
- icons – omitted
- action – The recommended action , a string