Giter Club home page Giter Club logo

stf-utils's Introduction

Build Status codecov

stf-utils

Python utilities for STF.

Features:

  • Connect Android devices from your STF instance with one simple command. Useful if you want to use STF with some automation tools (like Appium).
  • Record videos of your automated tests passing.
  • Write your own python apps using STF API client implementation.

Prerequisites:

  • Your STF instance is ready and you are using v2.0 or above.

stf-utils's People

Contributors

freakygranny avatar ksidenko avatar nwlunatic avatar rseek avatar sh0ked avatar skyline-gleb avatar z00sts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stf-utils's Issues

How to Connect to STF and run the recorder service

Hi ,
I was trying to connect the 2gis/stf-utils sevice to STF to get the recording videos.I just followed the steps which are mentioned in the Readme.doc.But i was unable to connect it to the stf service.Can you please let me know what are all the steps to follow to connect to STF and record the videos of the automation flow.

how run stf-utils +appium ?

I run stf-utils but after run appium test the stf down because adb server down.
I try to use desirecapabilities 'remoteAdbHost' but dont work because dont find the devices.

During installation error

PS C:\Users\user> pip install git+https://github.com/2gis/stf-utils.git
Collecting git+https://github.com/2gis/stf-utils.git
  Cloning https://github.com/2gis/stf-utils.git to c:\users\user\appdata\local\temp\pip-eh1e6m-build
Requirement already satisfied: six==1.10.0 in c:\python27\lib\site-packages (from stf-utils==0.0.1)
Requirement already satisfied: requests==2.10.0 in c:\python27\lib\site-packages (from stf-utils==0.0.1)
Collecting asyncio==3.4.3 (from stf-utils==0.0.1)
  Using cached asyncio-3.4.3.tar.gz
Requirement already satisfied: autobahn==0.13.0 in c:\python27\lib\site-packages\autobahn-0.13.0-py2.7.egg (from stf-uti
ls==0.0.1)
Collecting txaio>=2.2.2 (from autobahn==0.13.0->stf-utils==0.0.1)
  Using cached txaio-2.6.0-py2.py3-none-any.whl
Installing collected packages: asyncio, stf-utils, txaio
  Running setup.py install for asyncio ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\local\\temp\\pip-build-d1afbp\\asyncio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read
().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\user\appdata
\local\temp\pip-ipnxhz-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    creating build\lib.win32-2.7\asyncio
    copying asyncio\base_events.py -> build\lib.win32-2.7\asyncio
    copying asyncio\base_subprocess.py -> build\lib.win32-2.7\asyncio
    copying asyncio\constants.py -> build\lib.win32-2.7\asyncio
    copying asyncio\coroutines.py -> build\lib.win32-2.7\asyncio
    copying asyncio\events.py -> build\lib.win32-2.7\asyncio
    copying asyncio\futures.py -> build\lib.win32-2.7\asyncio
    copying asyncio\locks.py -> build\lib.win32-2.7\asyncio
    copying asyncio\log.py -> build\lib.win32-2.7\asyncio
    copying asyncio\proactor_events.py -> build\lib.win32-2.7\asyncio
    copying asyncio\protocols.py -> build\lib.win32-2.7\asyncio
    copying asyncio\queues.py -> build\lib.win32-2.7\asyncio
    copying asyncio\selectors.py -> build\lib.win32-2.7\asyncio
    copying asyncio\selector_events.py -> build\lib.win32-2.7\asyncio
    copying asyncio\sslproto.py -> build\lib.win32-2.7\asyncio
    copying asyncio\streams.py -> build\lib.win32-2.7\asyncio
    copying asyncio\subprocess.py -> build\lib.win32-2.7\asyncio
    copying asyncio\tasks.py -> build\lib.win32-2.7\asyncio
    copying asyncio\test_support.py -> build\lib.win32-2.7\asyncio
    copying asyncio\test_utils.py -> build\lib.win32-2.7\asyncio
    copying asyncio\transports.py -> build\lib.win32-2.7\asyncio
    copying asyncio\unix_events.py -> build\lib.win32-2.7\asyncio
    copying asyncio\windows_events.py -> build\lib.win32-2.7\asyncio
    copying asyncio\windows_utils.py -> build\lib.win32-2.7\asyncio
    copying asyncio\__init__.py -> build\lib.win32-2.7\asyncio
    running build_ext
    building 'asyncio._overlapped' extension
    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    C:\Users\user\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox
 /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcoverlapped.c /Fobuild\temp.win32-2.7\Release\overlapped
.obj
    overlapped.c
    overlapped.c(68) : error C2065: 'PyExc_ConnectionRefusedError' : undeclared identifier
    overlapped.c(68) : warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
    overlapped.c(71) : error C2065: 'PyExc_ConnectionAbortedError' : undeclared identifier
    overlapped.c(71) : warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
    overlapped.c(714) : warning C4013: 'Py_MIN' undefined; assuming extern returning int
    overlapped.c(716) : warning C4013: 'Py_MAX' undefined; assuming extern returning int
    overlapped.c(1145) : warning C4013: 'PyUnicode_AsWideCharString' undefined; assuming extern returning int
    overlapped.c(1145) : warning C4047: '=' : 'wchar_t *' differs in levels of indirection from 'int'
    overlapped.c(1287) : error C2079: 'overlapped_module' uses undefined struct 'PyModuleDef'
    overlapped.c(1288) : error C2065: 'PyModuleDef_HEAD_INIT' : undeclared identifier
    overlapped.c(1288) : error C2099: initializer is not a constant
    overlapped.c(1289) : warning C4047: 'initializing' : 'int' differs in levels of indirection from 'char [12]'
    overlapped.c(1290) : error C2078: too many initializers
    overlapped.c(1310) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1314) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1317) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1319) : warning C4013: 'PyModule_Create' undefined; assuming extern returning int
    overlapped.c(1319) : warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
    overlapped.c(1321) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    overlapped.c(1336) : warning C4098: 'PyInit__overlapped' : 'void' function returning a value
    error: command 'C:\\Users\\user\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC
\\Bin\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\local\\te
mp\\pip-build-d1afbp\\asyncio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n')
;f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\user\appdata\local\temp\pip-ipnxhz-r
ecord\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\user\appdata\local\temp\pip-build-d1afbp\asyncio\

Who can help?

Unsure how to run adb commands, also cannot generate a connected_devices.txt

I would like to use this framework to send simple adb commands to multiple devices but it seems that I am unable to. I do not have a connected_devices.txt as asked by the config.ini file and I'm wondering how to generate it as I am unable to.

Also any help in getting a simple adb devices command or even better adb shell am start -a android.intent.action.VIEW -d http://www.google.com to send this command to multiple devices connected to STF, startup a browser, and go to a webpage would be great!

Thanks

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.