robotframework-doctestlibrary 0.23.0.dev1__tar.gz → 0.23.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/CompareImage.py +1 -21
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/VisualTest.py +9 -14
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/PKG-INFO +16 -11
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/pyproject.toml +16 -8
- robotframework_doctestlibrary-0.23.0.dev1/setup.py +0 -52
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/Downloader.py +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/Ocr.py +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/PdfTest.py +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/PrintJob.py +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/PrintJobTests.py +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/__init__.py +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/LICENSE +0 -0
- {robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/README.md +0 -0
|
@@ -431,30 +431,10 @@ class CompareImage(object):
|
|
|
431
431
|
|
|
432
432
|
return cv2.resize(image, dim, interpolation=inter)
|
|
433
433
|
|
|
434
|
-
def
|
|
435
|
-
"""
|
|
436
|
-
Return a list of tuples with the dimensions of the images
|
|
437
|
-
Tuples shall be in format (width, height)
|
|
438
|
-
"""
|
|
439
|
-
dimensions = []
|
|
440
|
-
for i in range(len(self.opencv_images)):
|
|
441
|
-
dimensions.append((self.opencv_images[i].shape[1], self.opencv_images[i].shape[0]))
|
|
442
|
-
return dimensions
|
|
443
|
-
|
|
444
|
-
def get_image_with_placeholders(self, placeholders=None, resize=False, dimensions=None, blur=False):
|
|
434
|
+
def get_image_with_placeholders(self, placeholders=None):
|
|
445
435
|
if placeholders is None:
|
|
446
436
|
placeholders = self.placeholders
|
|
447
437
|
images_with_placeholders = self.opencv_images
|
|
448
|
-
for i in range(len(images_with_placeholders)):
|
|
449
|
-
if resize:
|
|
450
|
-
if dimensions is None:
|
|
451
|
-
raise AssertionError("Dimensions must be defined for resizing")
|
|
452
|
-
images_with_placeholders[i] = cv2.resize(images_with_placeholders[i], dimensions[i])
|
|
453
|
-
if blur:
|
|
454
|
-
kernel_size = int(images_with_placeholders[i].shape[1]/50)
|
|
455
|
-
# must be odd if median
|
|
456
|
-
kernel_size += kernel_size%2-1
|
|
457
|
-
images_with_placeholders[i] = cv2.GaussianBlur(images_with_placeholders[i], (kernel_size, kernel_size), 1.5)
|
|
458
438
|
for placeholder in placeholders:
|
|
459
439
|
if placeholder['page'] == 'all':
|
|
460
440
|
for i in range(len(images_with_placeholders)):
|
|
@@ -183,14 +183,12 @@ class VisualTest(object):
|
|
|
183
183
|
reference_compare_image = CompareImage(reference_image, placeholder_file=placeholder_file, contains_barcodes=contains_barcodes, get_pdf_content=get_pdf_content, DPI=self.DPI, force_ocr=force_ocr, mask=mask, ocr_engine=ocr_engine)
|
|
184
184
|
candidate_compare_image = CompareImage(test_image, contains_barcodes=contains_barcodes, get_pdf_content=get_pdf_content, DPI=self.DPI)
|
|
185
185
|
|
|
186
|
-
reference_image_dimensions = reference_compare_image.get_image_dimensions()
|
|
187
|
-
|
|
188
186
|
|
|
189
187
|
tic = time.perf_counter()
|
|
190
188
|
if reference_compare_image.placeholders != []:
|
|
191
189
|
candidate_compare_image.placeholders = reference_compare_image.placeholders
|
|
192
|
-
reference_collection = reference_compare_image.get_image_with_placeholders(
|
|
193
|
-
compare_collection = candidate_compare_image.get_image_with_placeholders(
|
|
190
|
+
reference_collection = reference_compare_image.get_image_with_placeholders()
|
|
191
|
+
compare_collection = candidate_compare_image.get_image_with_placeholders()
|
|
194
192
|
logging.debug("OCR Data: {}".format(reference_compare_image.text_content))
|
|
195
193
|
else:
|
|
196
194
|
reference_collection = reference_compare_image.opencv_images
|
|
@@ -478,14 +476,13 @@ class VisualTest(object):
|
|
|
478
476
|
grayA = cv2.cvtColor(reference, cv2.COLOR_BGR2GRAY)
|
|
479
477
|
grayB = cv2.cvtColor(candidate, cv2.COLOR_BGR2GRAY)
|
|
480
478
|
|
|
481
|
-
# Blur
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
# grayB = cv2.GaussianBlur(grayB, (kernel_size, kernel_size), 1.5)
|
|
479
|
+
# Blur images if blur=True
|
|
480
|
+
if compare_options['blur']:
|
|
481
|
+
kernel_size = int(grayA.shape[1]/50)
|
|
482
|
+
# must be odd if median
|
|
483
|
+
kernel_size += kernel_size%2-1
|
|
484
|
+
grayA = cv2.GaussianBlur(grayA, (kernel_size, kernel_size), 1.5)
|
|
485
|
+
grayB = cv2.GaussianBlur(grayB, (kernel_size, kernel_size), 1.5)
|
|
489
486
|
|
|
490
487
|
if self.take_screenshots:
|
|
491
488
|
# Not necessary to take screenshots for every successful comparison
|
|
@@ -816,8 +813,6 @@ class VisualTest(object):
|
|
|
816
813
|
self.add_screenshot_to_log(self.overlay_two_images(
|
|
817
814
|
diff_area_reference, diff_area_candidate), "_diff_area_blended")
|
|
818
815
|
if images_are_equal is not True:
|
|
819
|
-
logging.info(
|
|
820
|
-
f'The compared images are different with a score of {score}')
|
|
821
816
|
raise AssertionError('The compared images are different.')
|
|
822
817
|
|
|
823
818
|
@keyword
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: robotframework-doctestlibrary
|
|
3
|
-
Version: 0.23.
|
|
3
|
+
Version: 0.23.1
|
|
4
4
|
Summary: A library for Visual Document Testing
|
|
5
|
-
Home-page: https://github.com/manykarim/robotframework-doctestlibrary
|
|
6
5
|
License: Apache-2.0
|
|
7
6
|
Author: Many Kasiriha
|
|
8
7
|
Author-email: many.kasiriha@dbschenker.com
|
|
9
8
|
Maintainer: Many Kasiriha
|
|
10
9
|
Maintainer-email: many.kasiriha@dbschenker.com
|
|
11
|
-
Requires-Python: >=3.8,<4.0
|
|
10
|
+
Requires-Python: >=3.8.1,<4.0.0
|
|
12
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
12
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
Requires-Dist: PyMuPDF (>=1.23.1)
|
|
19
19
|
Requires-Dist: Wand
|
|
20
|
-
Requires-Dist: deepdiff
|
|
20
|
+
Requires-Dist: deepdiff (<8.0) ; python_version < "3.9"
|
|
21
|
+
Requires-Dist: deepdiff (>=6.0) ; python_version >= "3.12"
|
|
22
|
+
Requires-Dist: deepdiff ; python_version >= "3.9" and python_version < "3.12"
|
|
21
23
|
Requires-Dist: imutils
|
|
22
|
-
Requires-Dist: numpy (<1.25) ;
|
|
23
|
-
Requires-Dist: numpy (>=1.
|
|
24
|
-
Requires-Dist: numpy ;
|
|
24
|
+
Requires-Dist: numpy (<1.25) ; python_version == "3.8"
|
|
25
|
+
Requires-Dist: numpy (>=1.25,<2.0) ; python_version == "3.9"
|
|
26
|
+
Requires-Dist: numpy (>=1.26) ; python_version >= "3.10" and python_version < "3.13"
|
|
27
|
+
Requires-Dist: numpy (>=2.1.0) ; python_version >= "3.13"
|
|
25
28
|
Requires-Dist: opencv-python-headless
|
|
26
29
|
Requires-Dist: parsimonious
|
|
27
30
|
Requires-Dist: pylibdmtx
|
|
@@ -29,12 +32,14 @@ Requires-Dist: pytesseract
|
|
|
29
32
|
Requires-Dist: pyzbar (>=0.1.9,<0.2.0)
|
|
30
33
|
Requires-Dist: robotframework (>=4)
|
|
31
34
|
Requires-Dist: scikit-image (<0.22) ; python_full_version <= "3.8.0"
|
|
32
|
-
Requires-Dist: scikit-image (>=0.22
|
|
35
|
+
Requires-Dist: scikit-image (>=0.22.0) ; python_version == "3.12"
|
|
36
|
+
Requires-Dist: scikit-image (>=0.25.0) ; python_version >= "3.13"
|
|
33
37
|
Requires-Dist: scikit-image ; python_full_version > "3.8.0" and python_version < "3.12"
|
|
34
38
|
Requires-Dist: scipy (<1.11) ; python_full_version <= "3.8.0"
|
|
35
|
-
Requires-Dist: scipy (>=1.11
|
|
39
|
+
Requires-Dist: scipy (>=1.11) ; python_version >= "3.12" and python_version < "4.0"
|
|
36
40
|
Requires-Dist: scipy ; python_full_version > "3.8.0" and python_version < "3.12"
|
|
37
41
|
Requires-Dist: setuptools ; python_version >= "3.12" and python_version < "4.0"
|
|
42
|
+
Project-URL: Homepage, https://github.com/manykarim/robotframework-doctestlibrary
|
|
38
43
|
Description-Content-Type: text/markdown
|
|
39
44
|
|
|
40
45
|
|
{robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/pyproject.toml
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "robotframework-doctestlibrary"
|
|
3
|
-
version = "0.23.
|
|
3
|
+
version = "0.23.1"
|
|
4
4
|
description = "A library for Visual Document Testing"
|
|
5
5
|
authors = ["Many Kasiriha <many.kasiriha@dbschenker.com>"]
|
|
6
6
|
maintainers = ["Many Kasiriha <many.kasiriha@dbschenker.com>"]
|
|
@@ -13,13 +13,14 @@ readme = "./README.md"
|
|
|
13
13
|
homepage = "https://github.com/manykarim/robotframework-doctestlibrary"
|
|
14
14
|
|
|
15
15
|
[tool.poetry.dependencies]
|
|
16
|
-
python = "^3.8"
|
|
16
|
+
python = "^3.8.1"
|
|
17
17
|
PyMuPDF = ">=1.23.1"
|
|
18
18
|
imutils = "*"
|
|
19
19
|
numpy = [
|
|
20
|
-
{version = "<1.25", python = "
|
|
21
|
-
{version = "
|
|
22
|
-
{version = "
|
|
20
|
+
{ version = "<1.25", python = ">=3.8, <3.9" },
|
|
21
|
+
{ version = ">=1.25, <2.0", python = ">=3.9, <3.10" },
|
|
22
|
+
{ version = ">=1.26", python = ">=3.10, <3.13" },
|
|
23
|
+
{ version = ">=2.1.0", python = ">=3.13" }
|
|
23
24
|
]
|
|
24
25
|
opencv-python-headless = "*"
|
|
25
26
|
parsimonious = "*"
|
|
@@ -28,16 +29,23 @@ robotframework = ">=4"
|
|
|
28
29
|
scipy = [
|
|
29
30
|
{version = "<1.11", python = "<=3.8"},
|
|
30
31
|
{version = "*", python = ">3.8,<3.12"},
|
|
31
|
-
{version = "
|
|
32
|
+
{version = ">=1.11", python = "^3.12"}
|
|
32
33
|
]
|
|
33
34
|
scikit-image = [
|
|
34
35
|
{version = "<0.22", python = "<=3.8"},
|
|
35
36
|
{version = "*", python = ">3.8,<3.12"},
|
|
36
|
-
{version = "
|
|
37
|
+
{version = ">=0.22.0", python = ">=3.12,<3.13"},
|
|
38
|
+
{version = ">=0.25.0", python = ">=3.13"},
|
|
39
|
+
|
|
37
40
|
]
|
|
38
41
|
Wand = "*"
|
|
39
42
|
pylibdmtx = "*"
|
|
40
|
-
deepdiff =
|
|
43
|
+
deepdiff = [
|
|
44
|
+
{ version = "<8.0", python = "<3.9" },
|
|
45
|
+
{ version = "*", python = ">=3.9,<3.12" },
|
|
46
|
+
{ version = ">=6.0", python = ">=3.12" }
|
|
47
|
+
]
|
|
48
|
+
|
|
41
49
|
pyzbar = "^0.1.9"
|
|
42
50
|
setuptools = { version = "*", python = "^3.12" }
|
|
43
51
|
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
packages = \
|
|
5
|
-
['DocTest']
|
|
6
|
-
|
|
7
|
-
package_data = \
|
|
8
|
-
{'': ['*']}
|
|
9
|
-
|
|
10
|
-
install_requires = \
|
|
11
|
-
['PyMuPDF>=1.23.1',
|
|
12
|
-
'Wand',
|
|
13
|
-
'deepdiff',
|
|
14
|
-
'imutils',
|
|
15
|
-
'opencv-python-headless',
|
|
16
|
-
'parsimonious',
|
|
17
|
-
'pylibdmtx',
|
|
18
|
-
'pytesseract',
|
|
19
|
-
'pyzbar>=0.1.9,<0.2.0',
|
|
20
|
-
'robotframework>=4']
|
|
21
|
-
|
|
22
|
-
extras_require = \
|
|
23
|
-
{':python_full_version <= "3.8.0"': ['numpy<1.25',
|
|
24
|
-
'scipy<1.11',
|
|
25
|
-
'scikit-image<0.22'],
|
|
26
|
-
':python_full_version > "3.8.0" and python_version < "3.12"': ['numpy',
|
|
27
|
-
'scipy',
|
|
28
|
-
'scikit-image'],
|
|
29
|
-
':python_version >= "3.12" and python_version < "4.0"': ['numpy>=1.26,<2.0',
|
|
30
|
-
'scipy>=1.11,<2.0',
|
|
31
|
-
'scikit-image>=0.22,<0.23',
|
|
32
|
-
'setuptools']}
|
|
33
|
-
|
|
34
|
-
setup_kwargs = {
|
|
35
|
-
'name': 'robotframework-doctestlibrary',
|
|
36
|
-
'version': '0.23.0.dev1',
|
|
37
|
-
'description': 'A library for Visual Document Testing',
|
|
38
|
-
'long_description': '\n# robotframework-doctestlibrary\n----\n[Robot Framework](https://robotframework.org) DocTest library. \nSimple Automated Visual Document Testing.\n\nSee **keyword documentation** for\n\n- [Visual Document Tests](https://manykarim.github.io/robotframework-doctestlibrary/VisualTest.html)\n- [Print Job Tests](https://manykarim.github.io/robotframework-doctestlibrary/PrintJobTest.html)\n- [Pdf Tests (very basic)](https://manykarim.github.io/robotframework-doctestlibrary/PdfTest.html)\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nCompare two Images and highlight differences\n Compare Images Reference.jpg Candidate.jpg\n```\n\n[](https://youtu.be/qmpwlQoJ-nE "DocTest Library presentation at robocon.io 2021")\n\n# Installation instructions\n\n`pip install --upgrade robotframework-doctestlibrary`\n\nOnly Python 3.X or newer is supported. Tested with Python 3.8/3.11/3.12\n\n## Install robotframework-doctestlibrary\n\n### Installation via `pip` from PyPI (recommended)\n\n* `pip install --upgrade robotframework-doctestlibrary`\n\n### Installation via `pip` from GitHub\n\n* `pip install git+https://github.com/manykarim/robotframework-doctestlibrary.git` \n\nor\n\n* `git clone https://github.com/manykarim/robotframework-doctestlibrary.git`\n* `cd robotframework-doctestlibrary`\n* `pip install -e .`\n\n## Install dependencies\n\nInstall Tesseract, Ghostscript, GhostPCL, ImageMagick binaries and barcode libraries (libdmtx, zbar) on your system.\n<br>Hint: Since `0.2.0` Ghostscript, GhostPCL and ImageMagick are only needed for rendering `.ps` and `.pcl`files.\n<br> Rendering and content parsing of `.pdf` is done via `MuPDF`\n<br>In the future there might be a separate pypi package for `.pcl` and `.ps` files to get rid of those dependencies.\n\nLinux\n```bash\napt-get install imagemagick tesseract-ocr ghostscript libdmtx0b libzbar0\n```\n\nWindows\n * https://github.com/UB-Mannheim/tesseract/wiki\n * https://ghostscript.com/releases/gsdnld.html\n * https://ghostscript.com/releases/gpcldnld.html\n * https://imagemagick.org/script/download.php\n\n\n## Some special instructions for Windows \n\n### Rename executable for GhostPCL to pcl6.exe (only needed for `.pcl` support)\nThe executable for GhostPCL `gpcl6win64.exe` needs to be renamed to `pcl6.exe`\n\nOtherwise it will not be possible to render .pcl files successfully for visual comparison.\n\n### Add tesseract, ghostscript and imagemagick to system path in windows (only needed for OCR, `.pcl` and `.ps` support)\n* C:\\Program Files\\ImageMagick-7.0.10-Q16-HDRI\n* C:\\Program Files\\Tesseract-OCR\n* C:\\Program Files\\gs\\gs9.53.1\\bin\n* C:\\Program Files\\gs\\ghostpcl-9.53.1-win64\n\n(The folder names and versions on your system might be different)\n\nThat means: When you open the CMD shell you can run the commands\n* `magick.exe`\n* `tesseract.exe`\n* `gswin64.exe`\n* `pcl6.exe`\n\nsuccessfully from any folder/location\n\n### Windows error message regarding pylibdmtx\n\n[How to solve ImportError for pylibdmtx](https://github.com/NaturalHistoryMuseum/pylibdmtx/#windows-error-message)\n\nIf you see an ugly `ImportError` when importing `pylibdmtx` on\nWindows you will most likely need the [Visual C++ Redistributable Packages for\nVisual Studio 2013](https://www.microsoft.com/en-US/download/details.aspx?id=40784). Install `vcredist_x64.exe` if using 64-bit Python, `vcredist_x86.exe` if using 32-bit Python.\n\n## ImageMagick\n\nThe library might return the error `File could not be converted by ImageMagick to OpenCV Image: <path to the file>` when comparing PDF files.\nThis is due to ImageMagick permissions. Verify this as follows with the `sample.pdf` in the `testdata` directory:\n```bash\nconvert sample.pdf sample.jpg \nconvert-im6.q16: attempt to perform an operation not allowed by the security policy\n```\n\nSolution is to copy the `policy.xml` from the repository to the ImageMagick installation directory.\n\n## Docker\n\nYou can also use the [docker images](https://github.com/manykarim/robotframework-doctestlibrary/packages) or create your own Docker Image\n`docker build -t robotframework-doctest .`\nAfterwards you can, e.g., start the container and run the povided examples like this:\n* Windows\n * `docker run -t -v "%cd%":/opt/test -w /opt/test robotframework-doctest robot atest/Compare.robot`\n* Linux\n * `docker run -t -v $PWD:/opt/test -w /opt/test robotframework-doctest robot atest/Compare.robot`\n\n## Gitpod.io\n[](https://gitpod.io/#https://github.com/manykarim/robotframework-doctestlibrary) \nTry out the library using [Gitpod](https://gitpod.io/#https://github.com/manykarim/robotframework-doctestlibrary)\n\n# Examples\n\nHave a look at \n* [Visual Comparison Tests](./atest/Compare.robot)\n* [PDF Content Tests](./atest/PdfContent.robot)\n* [Print Job Tests](./atest/PrintJobs.robot)\n\nfor more examples.\n\n### Testing with [Robot Framework](https://robotframework.org)\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nCompare two Images and highlight differences\n Compare Images Reference.jpg Candidate.jpg\n```\n\n### Use masks/placeholders to exclude parts from visual comparison\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nCompare two Images and ignore parts by using masks\n Compare Images Reference.jpg Candidate.jpg placeholder_file=masks.json\n\nCompare two PDF Docments and ignore parts by using masks\n Compare Images Reference.jpg Candidate.jpg placeholder_file=masks.json\n\nCompare two Farm images with date pattern\n Compare Images Reference.jpg Candidate.jpg placeholder_file=testdata/pattern_mask.json\n\nCompare two Farm images with area mask as list\n ${top_mask} Create Dictionary page=1 type=area location=top percent=10\n ${bottom_mask} Create Dictionary page=all type=area location=bottom percent=10\n ${masks} Create List ${top_mask} ${bottom_mask}\n Compare Images Reference.jpg Candidate.jpg mask=${masks}\n\nCompare two Farm images with area mask as string\n Compare Images Reference.jpg Candidate.jpg mask=top:10;bottom:10\n\n```\n#### Different Mask Types to Ignore Parts When Comparing\n##### Areas, Coordinates, Text Patterns\n```python\n[\n {\n "page": "all",\n "name": "Date Pattern",\n "type": "pattern",\n "pattern": ".*[0-9]{2}-[a-zA-Z]{3}-[0-9]{4}.*"\n },\n {\n "page": "1",\n "name": "Top Border",\n "type": "area",\n "location": "top",\n "percent": 5\n },\n {\n "page": "1",\n "name": "Left Border",\n "type": "area",\n "location": "left",\n "percent": 5\n },\n {\n "page": 1,\n "name": "Top Rectangle",\n "type": "coordinates",\n "x": 0,\n "y": 0,\n "height": 10,\n "width": 210,\n "unit": "mm"\n }\n]\n```\n### Accept visual different by checking move distance or text content\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nAccept if parts are moved up to 20 pixels by pure visual check\n Compare Images Reference.jpg Candidate.jpg move_tolerance=20\n\nAccept if parts are moved up to 20 pixels by reading PDF Data\n Compare Images Reference.pdf Candidate.pdf move_tolerance=20 get_pdf_content=${true}\n\nAccept differences if text content is the same via OCR\n Compare Images Reference.jpg Candidate.jpg check_text_content=${true}\n\nAccept differences if text content is the same from PDF Data\n Compare Images Reference.pdf Candidate.pdf check_text_content=${true} get_pdf_content=${true}\n```\n\n#### Different options to detect moved parts/objects\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest movement_detection=orb\n\n*** Test Cases ***\nAccept if parts are moved up to 20 pixels by pure visual check\n Compare Images Reference.jpg Candidate.jpg move_tolerance=20\n```\t\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest movement_detection=template\n\n*** Test Cases ***\nAccept if parts are moved up to 20 pixels by pure visual check\n Compare Images Reference.jpg Candidate.jpg move_tolerance=20\n```\t\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest movement_detection=classic\n\n*** Test Cases ***\nAccept if parts are moved up to 20 pixels by pure visual check\n Compare Images Reference.jpg Candidate.jpg move_tolerance=20\n```\t\n\n### Options for taking additional screenshots, screenshot format and render resolution\nTake additional screenshots or reference and candidate file.\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest take_screenshots=${true} screenshot_format=png\n```\nTake diff screenshots to highlight differences\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest show_diff=${true} DPI=300\n```\n\n### Experimental usage of Open CV East Text Detection to improve OCR\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nCompare two Farm images with date pattern and east detection\n Compare Images Reference.jpg Candidate.jpg placeholder_file=masks.json ocr_engine=east\n```\n\n### Check content of PDF files\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.PdfTest\n\n*** Test Cases ***\nCheck if list of strings exists in PDF File\n @{strings}= Create List First String Second String\n PDF Should Contain Strings ${strings} Candidate.pdf\n \nCompare two PDF Files and only check text content\n Compare Pdf Documents Reference.pdf Candidate.pdf compare=text\n\nCompare two PDF Files and only check text content and metadata\n Compare Pdf Documents Reference.pdf Candidate.pdf compare=text,metadata\n \nCompare two PDF Files and check all possible content\n Compare Pdf Documents Reference.pdf Candidate.pdf\n```\n\n### Ignore Watermarks for Visual Comparisons\nStore the watermark in a separate B/W image or PDF.\n<br>\nWatermark area needs to be filled with black color.\n<br>\nWatermark content will be subtracted from Visual Comparison result.\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nCompare two Images and ignore jpg watermark\n Compare Images Reference.jpg Candidate.jpg watermark_file=Watermark.jpg\n\nCompare two Images and ignore pdf watermark\n Compare Images Reference.pdf Candidate.pdf watermark_file=Watermark.pdf\n\nCompare two Images and ignore watermark folder\n Compare Images Reference.pdf Candidate.pdf watermark_file=${CURDIR}${/}watermarks\n```\n\nWatermarks can also be passed on Library import. This setting will apply to all Test Cases in Test Suite\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest watermark_file=${CURDIR}${/}watermarks\n\n*** Test Cases ***\nCompare two Images and ignore watermarks\n Compare Images Reference.jpg Candidate.jpg\n```\n\n### Get Text From Documents or Images\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nGet Text Content And Compare\n ${text} Get Text From Document Reference.pdf\n List Should Contain Value ${text} Test String\n```\n\n### Get Barcodes From Documents or Images\n\n```RobotFramework\n*** Settings ***\nLibrary DocTest.VisualTest\n\n*** Test Cases ***\nGet Text Content And Compare\n ${text} Get Barcodes From Document reference.jpg\n List Should Contain Value ${text} 123456789\n```\n\n### Using pabot to run tests in parallel\n\nDocument Testing can be run in parallel using [pabot](https://pabot.org/). \nHowever, you need to pass the additional arguments `--artifacts` and `--artifactsinsubfolders` to the `pabot` command, to move the screenshots to the correct subfolder. \nOtherwise the screenshots will not be visible in the `log.html`\n\n```\npabot --testlevelsplit --processes 8 --artifacts png,jpg,pdf,xml --artifactsinsubfolders /path/to/your/tests/\n```\n\n### Visual Testing of Web Applications\n\nI experimented a bit and tried to use this library for Visual Testing of Web Applications. \nPlease have a look at this pilot example [here](https://github.com/manykarim/robotframework-doctestlibrary/blob/main/atest/Browser.robot)\n\n# Development\n\nFeel free to create issues or pull requests. \nI\'m always happy for any feedback.\n\n## Core team\n\nIn order of appearance.\n\n * Many Kasiriha\n * April Wang\n\n## Contributors\n\nThis project is community driven and becomes a reality only through the work of all the people who contribute.\n',
|
|
39
|
-
'author': 'Many Kasiriha',
|
|
40
|
-
'author_email': 'many.kasiriha@dbschenker.com',
|
|
41
|
-
'maintainer': 'Many Kasiriha',
|
|
42
|
-
'maintainer_email': 'many.kasiriha@dbschenker.com',
|
|
43
|
-
'url': 'https://github.com/manykarim/robotframework-doctestlibrary',
|
|
44
|
-
'packages': packages,
|
|
45
|
-
'package_data': package_data,
|
|
46
|
-
'install_requires': install_requires,
|
|
47
|
-
'extras_require': extras_require,
|
|
48
|
-
'python_requires': '>=3.8,<4.0',
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
setup(**setup_kwargs)
|
|
File without changes
|
{robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/DocTest/Ocr.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotframework_doctestlibrary-0.23.0.dev1 → robotframework_doctestlibrary-0.23.1}/README.md
RENAMED
|
File without changes
|