Robot Framework library for generating BSNs (Dutch citizen service number)
Project description
BSNLibrary for Robot Framework
Robot Framework Library for generating a random BSN (Burger Service Nummer, i.e. a Dutch citizen service number) for test purposes.
A BSN is used in Netherlands to identify a person for government organisations, see this information of the Dutch government. The number consists of 9 digits and has to pass the eleven test.
This test can be explained with the example 211551557. Each digit is multiplied with its position and the results are added up together:
(9*2) + (8*1) + (7*1) + (6*5) + (5*5) + (4*1) + (3*5) + (2*5) - (1*7) = 110
Note that the digit in position 1 is subtracted from the other results. The total sum can be divided by 11, which means that this number has passed the eleven test.
This library brings the following features to Robot Framework:
- generating a valid BSN
- generating a BSN that is unique within the current test run
- generating a number that will not pass the eleven test
- generating a BSN that starts with specific digits
- generating a BSN that is less than 9 digits long
- checking if a given number passes the eleven test
- returning a list of BSNs generated during the current test run
- clearing the list of BSNs generated during the current test run
Possible use cases
- A test message that is processed by one or more systems can be tracked by its unique BSN
- Creating messages with BSNs in a certain range that leads to a certain response from a system or stub
- Checking whether a test message contains a valid BSN
Create date: 01-03-2020
Author: Henk van den Akker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for robotframework-bsnlibrary-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7288bb5cfc6623a9874e5ea8bf952759785ed5f9562c2c7bf4f6443575ea427 |
|
MD5 | bb5aa1780efa8710e48084541370999d |
|
BLAKE2b-256 | 9983fffd64536c98e0ac1a35fc10242a9cedbbf30cf6116292ff5460c754b0a3 |
Hashes for robotframework_bsnlibrary-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f86fec7878ce4b57d149d541248e03167108d4bc04c3ebf4b8eb297281d206c3 |
|
MD5 | 72f793428e9c86eac0cbc159d2d92b10 |
|
BLAKE2b-256 | 187859558b4e4f2f16cabd70566067db439ef5ab213c26a2118f2bf197827939 |