Code Monkey home page Code Monkey logo

wmas2017's Introduction

The Web Media API Test Suite 2017

The Web Media API Snapshot Test Suite 2017 is a cross-browser test suite. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.

This project is forked from the original W3C Web Platform Tests and is customized to run on web browsers for embedded devices and appliances suchs as TV sets, set-top boxes, consoles, etc. It supports tests report comparing and testing a chosen subset of API tests.

This test suite complies with the Web Media API Snapshot 2017. Note: JPEG File Interchange Format [JPEG], Portable Network Graphics (PNG) Specification (Second Edition) [PNG], Graphics Interchange Format [GIF], Open Font Format [OPEN-FONT-FORMAT] and WOFF File Format 1.0 [WOFF] are not sufficiently tested in this test suite, because there are no dedicated tests in the W3C Web Platform Tests.

Test server

The server makes it possible to run all tests in a single window.

Setup

Requirements:

  • Python 2.7+ (but not Python 3.x)
  • Node.js 8.x.x (LTS recommended)
  • Git 2.4+ (should support sparse checkout)
  • Bash script support (on windows we recommend Git BASH)

Generate hosts file:

$ ./wpt make-hosts-file | sudo tee -a /etc/hosts

on Windows:

$ python wpt make-hosts-file | Out-File %SystemRoot%\System32\drivers\etc\hosts -Encoding ascii -Append

Generate test subset, call from WPT root directory:

$ ./wmas2017-subset.sh

Initialize WAVE Server:

$ ./wave init

Start WAVE Server:

$ ./wave start

Start Web Platform Test runner:

$ ./wpt serve

Open in Web browser (on the same host):

http://web-platform.test:8050

Configuration

The default configuration is loaded from the config.default.json in the root directory. Configurations from the config.json in the same format as the config.default.jsonoverride those.

Provide a different location with --config < path_to_config > as a start parameter.

Test Run Parameters

It is possible to parameterize a test run with various query parameters provided with the query in the url of the initial request.

Example:

web-platform.test:8050/?path=/2dcontext&types=testharness

Query Parameters

Parameter Description Example
path Specify tests to run. Can be directory or file. Multiple paths can be chained by using , . Paths with leading '/' are interpreted as absolute paths, paths without as regular expressions. (Default: /) web-platform.test:8050/?path=/2dcontext
types What types of tests to run. Possible types: testharness, manual and reftest (Default: testharness) web-platform.test:8050/?types=testharness,manual
timeout Specify a server side timeout in ms after which a test with no result is timed out web-platform.test:8050/?timeout=65000
token and resume Providing a token of an unfinished session will resume it. web-platform.test:8050/?token=2fb0fb80-63db-4425-8a76-2ea3e6f8269d&resume=1

Certificates

By default pregenerated certificates for the web-platform.test domain are provided in tools/certs. If you wish to generate new certificates for any reason it's possible to use OpenSSL when starting the server, or starting a test run, by providing the --ssl-type=openssl argument to the wpt serve or wpt run commands.

If you installed OpenSSL in such a way that running openssl at a command line doesn't work, you also need to adjust the path to the OpenSSL binary. This can be done by adding a section to config.json like:

"ssl": {"openssl": {"binary": "/path/to/openssl"}}

Trusting Root CA

To prevent browser SSL warnings when running HTTPS tests locally, the web-platform-tests Root CA file cacert.pem in tools/certs must be added as a trusted certificate in your OS/browser.

wmas2017's People

Contributors

jgraham avatar ms2ger avatar rhauck avatar zcorpan avatar sideshowbarker avatar annevk avatar gsnedders avatar ayg avatar foolip avatar plehegar avatar andreastt avatar kojiishi avatar darobin avatar mrego avatar frivoal avatar dbaron avatar richschwer avatar deniak avatar birtles avatar cvrebert avatar zqzhang avatar hillbrad avatar domenic avatar dontcallmedom avatar jdm avatar finnle avatar bzbarsky avatar inexorabletash avatar jugglinmike avatar youennf avatar

Watchers

Patrick Heeren avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.