robotframework-webpack


Namerobotframework-webpack JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://kitconcept.com
SummaryA Robot Framework library for Webpack.
upload_time2018-03-03 21:58:54
maintainer
docs_urlNone
authorTimo Stollenwerk | kitconcept GmbH
requires_python
licenseApache License 2.0
keywords robotframework webpack javascript react angular vue
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ==============================================================================
A Robot Framework library for Webpack.
==============================================================================

.. image:: https://travis-ci.org/kitconcept/robotframework-webpack.svg?branch=master
    :target: https://travis-ci.org/kitconcept/robotframework-webpack

.. image:: https://img.shields.io/pypi/status/robotframework-webpack.svg
    :target: https://pypi.python.org/pypi/robotframework-webpack/
    :alt: Egg Status

.. image:: https://img.shields.io/pypi/v/robotframework-webpack.svg
    :target: https://pypi.python.org/pypi/robotframework-webpack/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/l/robotframework-webpack.svg
    :target: https://pypi.python.org/pypi/robotframework-webpack/
    :alt: License

.. image:: https://raw.githubusercontent.com/kitconcept/robotframework-djangolibrary/master/kitconcept.png
   :alt: kitconcept
   :target: https://kitconcept.com/


Introduction
------------

WebpackLibrary is a Robot Framework library for Webpack. It allows to start
and stop the Webpack dev server.

Installation
------------

Install robotframework-webpack with pip::

  $ pip install robotframework-webpack


Documentation
-------------

https://kitconcept.github.io/robotframework-webpack/

Usage
-----

In order to write your first robot test, make sure that you include Selenium2Library and WebpackLibrary. Create a test.robot file with the following content::

  *** Variables ***
  ${HOST}                 127.0.0.1
  ${PORT}                 8080
  ${BROWSER}              chrome
  ${SERVER}               http://${HOST}:${PORT}


  *** Settings ***

  Documentation   WebpackLibrary Acceptance Tests
  Library         Selenium2Library  timeout=10  implicit_wait=0
  Library         WebpackLibrary
  Suite Setup     Start Webpack and Open Browser
  Suite Teardown  Stop Webpack and Close Browser


  *** Test Cases ***

  Scenario: Webpack Dev Server
    Go To  ${SERVER}
    # Amend this line to check for the real content of your app. Otherwise this test will fail.
    Wait until page contains  Hello World
    Page Should Contain  Hello World


  *** Keywords ***

  Start Webpack and Open Browser
    Start Webpack  yarn start
    Open Browser  ${SERVER}  ${BROWSER}
    Set Window Size  1280  1024

  Stop Webpack and Close Browser
    Stop Webpack
    Close Browser


Keywords
--------

Start Webpack: Starts the webpack process. The keyword take the command line command to start Webpack (e.g. 'yarn start').

  Start Webpack  yarn start

Optional parameters are:

  - path: relative or absolute path to the path where the command should be executed.
  - check: string that the keyword looks for in the Webpack output to know that Webpack has been fully started (default is 'Compiled successfully').
  - debug: returns debug information

Example with all parameters set::

  Start Webpack  yarn start
  ..  path=tests/test-create-react-app
  ..  check=Compiled successfully
  ..  debug=True

Stop Webpack: Stopps the webpack process that has been started with 'Start Webpack'.
The keyword has no parameters.

Rationale
---------

You can start a Webpack process with standard Robot Framework keywords::

  Run process  yarn run build  shell=True  cwd=${CURDIR}
  Run process  yarn global add serve  shell=True  cwd=${CURDIR}
  Start process  serve -s build  shell=True  cwd=${CURDIR}

You can even kill the process at the end of the test (suite)::

  Terminate All Processes  kill=True

Though. You will need to set a sleep statement to wait until the Webpack
process is fully up and running. Since this can take a considerable amount
of time it will make your test suite inefficient and hard to scale.

Robot Framework Webpack checks the output of the Webpack process until it
is fully up and running. As soon as Webpack is ready, the test can continue.


Development
-----------

Project Setup::

  $ virtualenv-2.7 .py27
  $ source .py27/bin/activate
  $ pip install -r requirements.txt
  $ python setup.py develop

Run Tests::

  $ .py27/bin/pybot tests


1.1.3 (2018-03-03)
------------------

Bugfixes:

- Do not fail safe_bytes when passed string is already a bytes string.
  [timo]


1.1.2 (2018-03-03)
------------------

Bugfixes:

- Fix "TypeError: a bytes-like object is required, not 'str'" on Python 3
  when calling the 'Start Webpack' keyword.
  [timo]


1.1.1 (2018-03-03)
------------------

Bugfixes:

- Fix unicode decode error on Python 3 when Webpack process raises a runtime error.
  [timo]


1.1.0 (2018-03-01)
------------------

New Features:

- Python 3 compatibility.
  [timo]


1.0.5 (2018-03-01)
------------------

Bugfixes:

- Remove br from README.rst. This breaks on Pypi.
  [timo]


1.0.4 (2018-03-01)
------------------

Bugfixes:

- Fix typo in 'Stop Webpack' keyword which breaks the entire library when it is imported.
  [timo]


1.0.3 (2018-03-01)
------------------

Bugfixes:

- Raise RuntimeError when 'Start Webpack' and 'Stop Webpack' fail.
  [timo]


1.0.2 (2018-02-15)
------------------

Bugfixes:

- Remove br in README which breaks the pypi page.
  [timo]


1.0.1 (2018-02-15)
------------------

Bugfixes:

- Fix ReST in README.
  [timo]


1.0.0 (2018-02-15)
------------------

Breaking Changes:

- Refactor 'Start Webpack' keyword.
  Remove "host", "port", "content_base", "config", "webpack_bin_path", "debug" params.
  Keep "path" param. Add required "command" param and an optional "check" param.
  [timo]

Bugfixes:

- Use a process group to start Webpack to being able to stop all child processes.
  This fixes issues with leftover child processes with create-react-app.
  [timo]


1.0a8 (2016-07-21)
------------------

Breaking Changes:

- Change ROBOT_LIBRARY_SCOPE to 'GLOBAL'. It does not make sense to fire up
  webpack for every single test.
  [timo]


1.0a7 (2016-07-19)
------------------

Bugfixes:

- Do not log the webpack path.
  [timo]


1.0a6 (2016-07-18)
------------------

Bugfixes:

- Allow to use 'Start Webpack' keyword without a debug attribute set. This
  fixes https://github.com/kitconcept/robotframework-webpack/issues/2.
  [timo]


1.0a5 (2016-07-13)
------------------

New Features:

- Add 'webpack_bin_path' param to 'Start Webpack' keyword.
  [timo]


1.0a4 (2016-07-13)
------------------

Breaking Changes:

- Move all arguments from WebpackLibrary import to 'Start Webpack' keyword.
  [timo]

Bugfixes:

- Remove requests from dependencies.
  [timo]

- Fix package keywords.
  [timo]


1.0a3 (2016-07-13)
------------------

Bugfixes:

- Fix content_base param.
  [timo]

- Log OSErrors when calling webpack.
  [timo]


1.0a2 (2016-07-13)
------------------

New Features:

- Add config parameter to WebpackLibrary.
  [timo]

1.0a1 (2016-07-12)
------------------

- Initial release.
  [timo]
            

Raw data

            {
    "_id": null,
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "cheesecake_code_kwalitee_id": null,
    "keywords": "robotframework webpack javascript react angular vue",
    "upload_time": "2018-03-03 21:58:54",
    "author": "Timo Stollenwerk | kitconcept GmbH",
    "home_page": "https://kitconcept.com",
    "download_url": "https://pypi.python.org/packages/e9/26/82da90a38f2aeaa5f50b795331ca0391f8cbfc239e1431c8a1033dc53fe2/robotframework-webpack-1.1.3.tar.gz",
    "platform": "",
    "version": "1.1.3",
    "cheesecake_documentation_id": null,
    "description": "==============================================================================\nA Robot Framework library for Webpack.\n==============================================================================\n\n.. image:: https://travis-ci.org/kitconcept/robotframework-webpack.svg?branch=master\n    :target: https://travis-ci.org/kitconcept/robotframework-webpack\n\n.. image:: https://img.shields.io/pypi/status/robotframework-webpack.svg\n    :target: https://pypi.python.org/pypi/robotframework-webpack/\n    :alt: Egg Status\n\n.. image:: https://img.shields.io/pypi/v/robotframework-webpack.svg\n    :target: https://pypi.python.org/pypi/robotframework-webpack/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/l/robotframework-webpack.svg\n    :target: https://pypi.python.org/pypi/robotframework-webpack/\n    :alt: License\n\n.. image:: https://raw.githubusercontent.com/kitconcept/robotframework-djangolibrary/master/kitconcept.png\n   :alt: kitconcept\n   :target: https://kitconcept.com/\n\n\nIntroduction\n------------\n\nWebpackLibrary is a Robot Framework library for Webpack. It allows to start\nand stop the Webpack dev server.\n\nInstallation\n------------\n\nInstall robotframework-webpack with pip::\n\n  $ pip install robotframework-webpack\n\n\nDocumentation\n-------------\n\nhttps://kitconcept.github.io/robotframework-webpack/\n\nUsage\n-----\n\nIn order to write your first robot test, make sure that you include Selenium2Library and WebpackLibrary. Create a test.robot file with the following content::\n\n  *** Variables ***\n  ${HOST}                 127.0.0.1\n  ${PORT}                 8080\n  ${BROWSER}              chrome\n  ${SERVER}               http://${HOST}:${PORT}\n\n\n  *** Settings ***\n\n  Documentation   WebpackLibrary Acceptance Tests\n  Library         Selenium2Library  timeout=10  implicit_wait=0\n  Library         WebpackLibrary\n  Suite Setup     Start Webpack and Open Browser\n  Suite Teardown  Stop Webpack and Close Browser\n\n\n  *** Test Cases ***\n\n  Scenario: Webpack Dev Server\n    Go To  ${SERVER}\n    # Amend this line to check for the real content of your app. Otherwise this test will fail.\n    Wait until page contains  Hello World\n    Page Should Contain  Hello World\n\n\n  *** Keywords ***\n\n  Start Webpack and Open Browser\n    Start Webpack  yarn start\n    Open Browser  ${SERVER}  ${BROWSER}\n    Set Window Size  1280  1024\n\n  Stop Webpack and Close Browser\n    Stop Webpack\n    Close Browser\n\n\nKeywords\n--------\n\nStart Webpack: Starts the webpack process. The keyword take the command line command to start Webpack (e.g. 'yarn start').\n\n  Start Webpack  yarn start\n\nOptional parameters are:\n\n  - path: relative or absolute path to the path where the command should be executed.\n  - check: string that the keyword looks for in the Webpack output to know that Webpack has been fully started (default is 'Compiled successfully').\n  - debug: returns debug information\n\nExample with all parameters set::\n\n  Start Webpack  yarn start\n  ..  path=tests/test-create-react-app\n  ..  check=Compiled successfully\n  ..  debug=True\n\nStop Webpack: Stopps the webpack process that has been started with 'Start Webpack'.\nThe keyword has no parameters.\n\nRationale\n---------\n\nYou can start a Webpack process with standard Robot Framework keywords::\n\n  Run process  yarn run build  shell=True  cwd=${CURDIR}\n  Run process  yarn global add serve  shell=True  cwd=${CURDIR}\n  Start process  serve -s build  shell=True  cwd=${CURDIR}\n\nYou can even kill the process at the end of the test (suite)::\n\n  Terminate All Processes  kill=True\n\nThough. You will need to set a sleep statement to wait until the Webpack\nprocess is fully up and running. Since this can take a considerable amount\nof time it will make your test suite inefficient and hard to scale.\n\nRobot Framework Webpack checks the output of the Webpack process until it\nis fully up and running. As soon as Webpack is ready, the test can continue.\n\n\nDevelopment\n-----------\n\nProject Setup::\n\n  $ virtualenv-2.7 .py27\n  $ source .py27/bin/activate\n  $ pip install -r requirements.txt\n  $ python setup.py develop\n\nRun Tests::\n\n  $ .py27/bin/pybot tests\n\n\n1.1.3 (2018-03-03)\n------------------\n\nBugfixes:\n\n- Do not fail safe_bytes when passed string is already a bytes string.\n  [timo]\n\n\n1.1.2 (2018-03-03)\n------------------\n\nBugfixes:\n\n- Fix \"TypeError: a bytes-like object is required, not 'str'\" on Python 3\n  when calling the 'Start Webpack' keyword.\n  [timo]\n\n\n1.1.1 (2018-03-03)\n------------------\n\nBugfixes:\n\n- Fix unicode decode error on Python 3 when Webpack process raises a runtime error.\n  [timo]\n\n\n1.1.0 (2018-03-01)\n------------------\n\nNew Features:\n\n- Python 3 compatibility.\n  [timo]\n\n\n1.0.5 (2018-03-01)\n------------------\n\nBugfixes:\n\n- Remove br from README.rst. This breaks on Pypi.\n  [timo]\n\n\n1.0.4 (2018-03-01)\n------------------\n\nBugfixes:\n\n- Fix typo in 'Stop Webpack' keyword which breaks the entire library when it is imported.\n  [timo]\n\n\n1.0.3 (2018-03-01)\n------------------\n\nBugfixes:\n\n- Raise RuntimeError when 'Start Webpack' and 'Stop Webpack' fail.\n  [timo]\n\n\n1.0.2 (2018-02-15)\n------------------\n\nBugfixes:\n\n- Remove br in README which breaks the pypi page.\n  [timo]\n\n\n1.0.1 (2018-02-15)\n------------------\n\nBugfixes:\n\n- Fix ReST in README.\n  [timo]\n\n\n1.0.0 (2018-02-15)\n------------------\n\nBreaking Changes:\n\n- Refactor 'Start Webpack' keyword.\n  Remove \"host\", \"port\", \"content_base\", \"config\", \"webpack_bin_path\", \"debug\" params.\n  Keep \"path\" param. Add required \"command\" param and an optional \"check\" param.\n  [timo]\n\nBugfixes:\n\n- Use a process group to start Webpack to being able to stop all child processes.\n  This fixes issues with leftover child processes with create-react-app.\n  [timo]\n\n\n1.0a8 (2016-07-21)\n------------------\n\nBreaking Changes:\n\n- Change ROBOT_LIBRARY_SCOPE to 'GLOBAL'. It does not make sense to fire up\n  webpack for every single test.\n  [timo]\n\n\n1.0a7 (2016-07-19)\n------------------\n\nBugfixes:\n\n- Do not log the webpack path.\n  [timo]\n\n\n1.0a6 (2016-07-18)\n------------------\n\nBugfixes:\n\n- Allow to use 'Start Webpack' keyword without a debug attribute set. This\n  fixes https://github.com/kitconcept/robotframework-webpack/issues/2.\n  [timo]\n\n\n1.0a5 (2016-07-13)\n------------------\n\nNew Features:\n\n- Add 'webpack_bin_path' param to 'Start Webpack' keyword.\n  [timo]\n\n\n1.0a4 (2016-07-13)\n------------------\n\nBreaking Changes:\n\n- Move all arguments from WebpackLibrary import to 'Start Webpack' keyword.\n  [timo]\n\nBugfixes:\n\n- Remove requests from dependencies.\n  [timo]\n\n- Fix package keywords.\n  [timo]\n\n\n1.0a3 (2016-07-13)\n------------------\n\nBugfixes:\n\n- Fix content_base param.\n  [timo]\n\n- Log OSErrors when calling webpack.\n  [timo]\n\n\n1.0a2 (2016-07-13)\n------------------\n\nNew Features:\n\n- Add config parameter to WebpackLibrary.\n  [timo]\n\n1.0a1 (2016-07-12)\n------------------\n\n- Initial release.\n  [timo]",
    "lcname": "robotframework-webpack",
    "name": "robotframework-webpack",
    "github": false,
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "A Robot Framework library for Webpack.",
    "split_keywords": [
        "robotframework",
        "webpack",
        "javascript",
        "react",
        "angular",
        "vue"
    ],
    "author_email": "stollenwerk@kitconcept.com",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2018-03-03T21:58:54",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/e9/26/82da90a38f2aeaa5f50b795331ca0391f8cbfc239e1431c8a1033dc53fe2/robotframework-webpack-1.1.3.tar.gz",
            "md5_digest": "dd273286f6e26501e723f86a4b3a9d6a",
            "downloads": 0,
            "filename": "robotframework-webpack-1.1.3.tar.gz",
            "packagetype": "sdist",
            "path": "e9/26/82da90a38f2aeaa5f50b795331ca0391f8cbfc239e1431c8a1033dc53fe2/robotframework-webpack-1.1.3.tar.gz",
            "size": 57614
        }
    ],
    "cheesecake_installability_id": null
}
        
Elapsed time: 0.10744s