Giter VIP home page Giter VIP logo

robot-framework-template's Introduction

Robot Framework Template

This repository provides a template to kickstart test project using Robot Framework.

Description

  • Separation between keywords library and test files
  • Import keywords library written in Python as module
  • Build the keywords library as Python package

Structure

.
├── ...
├── src
│   ├── lib                     # Library folder
│   │   ├── pythonmod           # Keywords library in Python
│   │   └── robotmod            # Keywords library in Robot
│   └── test                    # Test Folder, which uses keywords from lib
└── ...

Development Tools

Poetry

Poetry is used to package and manage dependencies in this project. The dependencies are listed in pyproject.toml.

To start developing in python virtual environment, execute the following commands:

# Optional: Create virtual environment in the root directory of project
poetry config virtualenvs.in-project true

# Install listed dependencies in virtual environment
poetry install

With those commands the dependencies will be installed in .venv folder in the project root directory. The existing test cases can be executed with the following command:

poetry run robot ./src/test/

The result can be observed directly in the terminal, in which the command was executed. More detailed report (i.e. log.html) is also generated in the directory of command execution.

Pre Commit

Pre Commit is a tool to manage git hook. E.g. with a pre-commit hook, files in stash will be checked before the commit is executed.

Install the hook defined in configuration file by executing the following command:

# If poetry is used: poetry run pre-commit install
pre-commit install

Dev Container

Dev Container offers the possiblity to develop in enclosed development container.

Using the CLI adevelopment container as described in configuration file can be spun up:

npm install -g @devcontainer/cli
devcontainer up

VS Code

If VS Code is choosen as editor, there are some extensions, which can help with the development:

Additional setting for using VS Code with Python virtual environment:

{
    // Set path of Python executable for both Robot and Python LSP
    "robot.python.executable": "${workspaceFolder}/.venv/bin/python",
    "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
}

robot-framework-template's People

Contributors

ptrptrd avatar

Watchers

 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.