Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/README.md

Issue 29501558: Issue 5383 - Add tests for the Chrome and Firefox packagers (Closed)
Patch Set: Addressing Dave's comments Created Oct. 17, 2017, 12:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/README.md
diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..89d4cdfbe78cb7ab8fc86ac44138682e0a5c8a7c
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,73 @@
+# Buildtools unit tests
+## Introduction
+Unit tests for buildtools, using the pytest framework.
+## Approach
+In order to test the buildtools capability of creating WebExtension-packages
+for Chrome, Edge and Firefox, an example configuration for each platform is
+Running the tests calls the same API as the cli would, except for releases
+(we don't want to trigger our releaseAutomation during tests) - in this case,
+a build is manually created and verified).
+Each extension is build with different parameters, the resulting package and
+it's content is compared against provided expected results:
+- Release or build-only, with or without a specific build-number (Edge)
+- Release, build-only or developement environment, with or without a specifc
+ build-number (Chrome, Firefox), with or without a predefined signing key
+ (Chrome)
+The expected results for each manifest are provided with the files in
+## Test cases
+_(Covered platforms are referred to as C=Chrome, E=Edge, F=Firefox)_
kzar 2017/10/17 13:03:54 Nit: Missing full stop.
tlucas 2017/10/18 11:23:05 Done.
+- Metadata inheritance (EF)
+- Correct package filename (CEF)
+- Printed warning about non-square icons (CF)
+- Presence of JavaScript unit test files in developement environment (CF)
+- Absence of JavaScript unit test files in build-only or release (CF)
+- Inlcusion of defined contentScripts into the manifest (CF)
+- Packaging (and moving) of included icons / scripts / HTML files (CEF)
+- Presence of files for all configured locales (CEF)
+- Correct import of translations with or without placeholders, with or without
+ access keys (CEF)
+- Translation presence and validity for the Chrome Web Store (C)
+- Packaging of modularized script files with webpack (CEF)
+- Adherence to provided build-number in the manifest (CEF)
+- Other content in the manifest (CEF)
+- Correct encrypted signature of the package (C)
+## Requirements
+- [Tox](https://pypi.python.org/pypi/tox) (>= 2.7.0)
+_(Tox will take care of installing the other dependencies such as flake8 and
+flake8-abp inside a virtualenv.)_
+## Usage
+To run the tests simply run
+$ tox
+in the buildtools' root folder.
+## Coverage
+Pytest will create a coverage report as output to the terminal, using the
+pytest plugin `pytest-cov`.
+In order to get an html report you can add `--cov-report=html` to the
+pytest-command in tox.ini.
+For more information please refer to the
+[coverage documentation](https://coverage.readthedocs.io/)

Powered by Google App Engine
This is Rietveld