Skip to content

Commit d33b068

Browse files
committed
add tests and update example images
1 parent b29ff3c commit d33b068

File tree

4 files changed

+76
-23
lines changed

4 files changed

+76
-23
lines changed

test-scripts/test-c.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,38 @@ LICENSE_KEY="${SCANBOT_LICENSE}"
4646
echo "Testing SCAN commands..."
4747
commands=(
4848
"scan barcode --file ../../images/qrcode.png --license \"${LICENSE_KEY}\""
49-
"scan document --file ../../images/Document.JPG --license \"${LICENSE_KEY}\""
50-
"scan check --file ../../images/check.jpg --license \"${LICENSE_KEY}\""
49+
"scan document --file ../../images/Document.png --license \"${LICENSE_KEY}\""
50+
"scan check --file ../../images/check.png --license \"${LICENSE_KEY}\""
5151
"scan credit_card --file ../../images/credit_card.png --license \"${LICENSE_KEY}\""
52-
"scan mrz --file \"../../images/MEXico MRZ passport old-1.jpg\" --license \"${LICENSE_KEY}\""
52+
"scan document_extractor --file ../../images/Document.png --license \"${LICENSE_KEY}\""
53+
"scan medical_certificate --file ../../images/medical_certificate.png --license \"${LICENSE_KEY}\""
54+
"scan mrz --file ../../images/MRZ_passport.png --license \"${LICENSE_KEY}\""
55+
"scan ocr --file ../../images/Document.png --license \"${LICENSE_KEY}\""
56+
"scan text_pattern --file ../../images/Document.png --license \"${LICENSE_KEY}\""
5357
"scan vin --file ../../images/VIN.png --license \"${LICENSE_KEY}\""
54-
"classify document --file ../../images/Document.JPG --license \"${LICENSE_KEY}\""
58+
"classify document --file ../../images/toll_receipt.png --license \"${LICENSE_KEY}\""
5559
"analyze analyze_multi_page --file ../../images/multi_page_document.pdf --license \"${LICENSE_KEY}\""
56-
"analyze crop_analyze --file ../../images/Document.JPG --save /tmp/crop.jpg --license \"${LICENSE_KEY}\""
60+
"analyze crop_analyze --file ../../images/Document.png --save /tmp/crop.jpg --license \"${LICENSE_KEY}\""
5761
"parse mrz --text \"P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<ERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<\" --license \"${LICENSE_KEY}\""
62+
"parse barcode_doc --text \"QR_CODE:https://example.com\" --license \"${LICENSE_KEY}\""
5863
)
5964

6065
command_names=(
6166
"Barcode scan"
6267
"Document scan"
6368
"Check scan"
6469
"Credit card scan"
70+
"Document extractor scan"
71+
"Medical certificate scan"
6572
"MRZ scan"
73+
"OCR scan"
74+
"Text pattern scan"
6675
"VIN scan"
6776
"Document classify"
6877
"Multi-page analyze"
6978
"Crop analyze"
7079
"MRZ parse"
80+
"Barcode document parse"
7181
)
7282

7383
for i in "${!commands[@]}"; do

test-scripts/test-java.sh

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,42 @@ fi
3232

3333
LICENSE_KEY="${SCANBOT_LICENSE}"
3434

35-
echo "Testing SCAN commands..."
35+
echo "Testing JAVA commands..."
3636
# All failures are actual failures - no exceptions for license errors
3737
commands=(
38-
"scan barcode --file ../images/qrcode.png --license \"${LICENSE_KEY}\""
39-
"scan document --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
40-
"scan check --file ../images/check.jpg --license \"${LICENSE_KEY}\""
41-
"scan credit_card --file ../images/credit_card.png --license \"${LICENSE_KEY}\""
42-
"scan mrz --file \"../images/MEXico MRZ passport old-1.jpg\" --license \"${LICENSE_KEY}\""
43-
"scan vin --file ../images/VIN.png --license \"${LICENSE_KEY}\""
44-
"classify document --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
45-
"analyze analyze_multi_page --file ../images/multi_page_document.pdf --license \"${LICENSE_KEY}\""
46-
"analyze crop_analyze --file ../images/Document.JPG --save /tmp/crop.jpg --license \"${LICENSE_KEY}\""
38+
"scan barcode --resource ../images/qrcode.png --license \"${LICENSE_KEY}\""
39+
"scan document --resource ../images/Document.png --license \"${LICENSE_KEY}\""
40+
"scan check --resource ../images/check.png --license \"${LICENSE_KEY}\""
41+
"scan credit_card --resource ../images/credit_card.png --license \"${LICENSE_KEY}\""
42+
"scan document_extractor --resource ../images/Document.png --license \"${LICENSE_KEY}\""
43+
"scan medical_certificate --resource ../images/medical_certificate.png --license \"${LICENSE_KEY}\""
44+
"scan mrz --resource ../images/MRZ_passport.png --license \"${LICENSE_KEY}\""
45+
"scan ocr --resource ../images/Document.png --license \"${LICENSE_KEY}\""
46+
"scan text_pattern --resource ../images/Document.png --license \"${LICENSE_KEY}\""
47+
"scan vin --resource ../images/VIN.png --license \"${LICENSE_KEY}\""
48+
"classify document --resource ../images/toll_receipt.png --license \"${LICENSE_KEY}\""
49+
"analyze analyze_multi_page --resource ../images/multi_page_document.pdf --license \"${LICENSE_KEY}\""
50+
"analyze crop_analyze --resource ../images/Document.png --license \"${LICENSE_KEY}\""
4751
"parse mrz --text \"P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<ERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<\" --license \"${LICENSE_KEY}\""
52+
"parse barcode_doc --text \"QR_CODE:https://example.com\" --license \"${LICENSE_KEY}\""
53+
)
54+
55+
command_names=(
56+
"Barcode scan"
57+
"Document scan"
58+
"Check scan"
59+
"Credit card scan"
60+
"Document extractor scan"
61+
"Medical certificate scan"
62+
"MRZ scan"
63+
"OCR scan"
64+
"Text pattern scan"
65+
"VIN scan"
66+
"Document classify"
67+
"Multi-page analyze"
68+
"Crop analyze"
69+
"MRZ parse"
70+
"Barcode document parse"
4871
)
4972

5073
command_names=(

test-scripts/test-nodejs.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,32 +40,42 @@ fi
4040

4141
LICENSE_KEY="${SCANBOT_LICENSE}"
4242

43-
echo "Testing SCAN commands..."
43+
echo "Testing NODEJS commands..."
4444
# All failures are actual failures - no exceptions for license errors
4545
commands=(
4646
"scan barcode --file ../images/qrcode.png --license \"${LICENSE_KEY}\""
47-
"scan document --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
48-
"scan check --file ../images/check.jpg --license \"${LICENSE_KEY}\""
47+
"scan document --file ../images/Document.png --license \"${LICENSE_KEY}\""
48+
"scan check --file ../images/check.png --license \"${LICENSE_KEY}\""
4949
"scan credit_card --file ../images/credit_card.png --license \"${LICENSE_KEY}\""
50-
"scan mrz --file \"../images/MEXico MRZ passport old-1.jpg\" --license \"${LICENSE_KEY}\""
50+
"scan document_extractor --file ../images/Document.png --license \"${LICENSE_KEY}\""
51+
"scan medical_certificate --file ../images/medical_certificate.png --license \"${LICENSE_KEY}\""
52+
"scan mrz --file ../images/MRZ_passport.png --license \"${LICENSE_KEY}\""
53+
"scan ocr --file ../images/Document.png --license \"${LICENSE_KEY}\""
54+
"scan text_pattern --file ../images/Document.png --license \"${LICENSE_KEY}\""
5155
"scan vin --file ../images/VIN.png --license \"${LICENSE_KEY}\""
52-
"classify document --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
56+
"classify document --file ../images/toll_receipt.png --license \"${LICENSE_KEY}\""
5357
"analyze analyze_multi_page --file ../images/multi_page_document.pdf --license \"${LICENSE_KEY}\""
54-
"analyze crop_analyze --file ../images/Document.JPG --save /tmp/crop.jpg --license \"${LICENSE_KEY}\""
58+
"analyze crop_analyze --file ../images/Document.png --license \"${LICENSE_KEY}\""
5559
"parse mrz --text \"P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<ERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<\" --license \"${LICENSE_KEY}\""
60+
"parse barcode_doc --text \"QR_CODE:https://example.com\" --license \"${LICENSE_KEY}\""
5661
)
5762

5863
command_names=(
5964
"Barcode scan"
6065
"Document scan"
6166
"Check scan"
6267
"Credit card scan"
68+
"Document extractor scan"
69+
"Medical certificate scan"
6370
"MRZ scan"
71+
"OCR scan"
72+
"Text pattern scan"
6473
"VIN scan"
6574
"Document classify"
6675
"Multi-page analyze"
6776
"Crop analyze"
6877
"MRZ parse"
78+
"Barcode document parse"
6979
)
7080

7181
for i in "${!commands[@]}"; do

test-scripts/test-python.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,35 @@ commands=(
3939
"scan document --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
4040
"scan check --file ../images/check.jpg --license \"${LICENSE_KEY}\""
4141
"scan credit_card --file ../images/credit_card.png --license \"${LICENSE_KEY}\""
42-
"scan mrz --file \"../images/MEXico MRZ passport old-1.jpg\" --license \"${LICENSE_KEY}\""
42+
"scan document_data_extractor --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
43+
"scan medical_certificate --file \"../images/medical_certificate.png\" --license \"${LICENSE_KEY}\""
44+
"scan mrz --file \"../images/MRZ_passport.jpg\" --license \"${LICENSE_KEY}\""
45+
"scan ocr --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
46+
"scan text_pattern --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
4347
"scan vin --file ../images/VIN.png --license \"${LICENSE_KEY}\""
44-
"classify document --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
48+
"classify document --file ../images/toll_receipt.png --license \"${LICENSE_KEY}\""
4549
"analyze analyze_multi_page --file ../images/multi_page_document.pdf --license \"${LICENSE_KEY}\""
4650
"analyze crop_analyze --file ../images/Document.JPG --license \"${LICENSE_KEY}\""
4751
"parse mrz --text \"P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<ERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<<\" --license \"${LICENSE_KEY}\""
52+
"parse barcode_doc --text \"QR_CODE:https://example.com\" --license \"${LICENSE_KEY}\""
4853
)
4954

5055
command_names=(
5156
"Barcode scan"
5257
"Document scan"
5358
"Check scan"
5459
"Credit card scan"
60+
"Document data extractor scan"
61+
"Medical certificate scan"
5562
"MRZ scan"
63+
"OCR scan"
64+
"Text pattern scan"
5665
"VIN scan"
5766
"Document classify"
5867
"Multi-page analyze"
5968
"Crop analyze"
6069
"MRZ parse"
70+
"Barcode document parse"
6171
)
6272

6373
for i in "${!commands[@]}"; do

0 commit comments

Comments
 (0)