Code Monkey home page Code Monkey logo

funq's Introduction

The funq project

funq is a tool to write FUNctional tests for Qt applications, both Widgets and QML, using python.

It is licenced under the CeCILL v2.1 licence (very close to the GPL v2). See the LICENCE.txt file distributed in the sources for more information.

The licence may appear restrictive, but as funq is a testing tool, you probably just don't mind. Do not deliver funq alongside your code source or compiled binaries if your licence is not compatible, that's all. You can still use the sources, or link with funq libraries for a personal use (like testing!).

Please feel free to contribute to this project by creating github issues, pull requests, or simply staring the project! It will be greatly appreciated.

Documentation:

https://readthedocs.org/projects/funq/badge/?version=latest

CI build status:

https://travis-ci.org/parkouss/funq.svg?branch=master https://ci.appveyor.com/api/projects/status/github/parkouss/funq?branch=master&svg=true

Get funq on PyPi (server and client packages):

Examples

Run your application like:

funq --host 0.0.0.0 --port 9000 YourApp

Then you can call from python like this:

from funq.client import FunqClient

funq = FunqClient("192.168.0.17", 9000)
funq.widget('btnTest').click()

Installation

You can easily install it from PyPi with pip or setuptools:

pip install funq-server
pip install funq

Note that funq-server will need qmake to build the C++ part of the server, and this installation will be Qt-compatible with the same Qt version of qmake.

To specify the path to qmake, you can define the FUNQ_QMAKE_PATH environment variable:

FUNQ_QMAKE_PATH=/usr/bin/qmake-qt5 pip install funq-server

Also, if you're not using virtualenv you may have to take root privileges to install funq.

You can instead get the sources and install it:

cd funq/
pip install server
pip install client

For contributors, you may want to use pip install -e instead of pip install commands. Note that virtualenv is highly recommended, so you can easily manage multiple python/Qt4/Qt5 environments.

When installing funq-server from sources, you can create a server/setup.cfg file to specify the qmake path:

[build_libfunq]
qmake_path = /usr/bin/qmake-qt5

Before running the pip install command, or use the FUNQ_QMAKE_PATH environment variable.

How does funq works

funq is divided in two parts:

  • funq-server is the server part of the project, composed of an executable called funq and a dynamic library libFunq. The funq executable allows to inject some code in a Qt application to start a TCP server that will allow to interact with the application.
  • funq is a python package that offers an API to interact with a libFunq TCP server. It is the client side of the project, and uses nosetests to launch FUNctional Qt tests.

Compatibility

Funq currently works with Python >= 3.5, Qt4 and Qt5 on GNU/Linux, macOS and Windows.

Documentation

Documentation is available at https://funq.readthedocs.io/

Thanks to

Thanks to Yann De Poulpiquet <[email protected]> and Riad Lezzar <[email protected]> to have contributed by writing the firsts functional tests with funq.

Thanks also to Jean-Luc Rouzoul, Dominique Constant and Mickaël Guérin for having supported this project.

Without them, funq would never have become a free software !

funq's People

Contributors

dbrgn avatar floufen avatar movermeyer avatar parkouss avatar rafaeldelucena avatar stayeasy avatar ubruhin avatar zitrax 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.