Skip to content

This a python util allows you to reserve and release any STF device

License

Notifications You must be signed in to change notification settings

maricoliu/stf-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

stf-tools

This a python util allows you to reserve and release any STF device

STF

STF project and api document are avaliable from below:

*STF github: https://github.com/openstf/stf

*STF API: https://github.com/openstf/stf/blob/master/doc/API.md

Usage

According to STF API, you need get token firstly. If you don't know how to get token, please refer to Authentication.

#coding: utf-8
from stf_tools import STF
	
# Your STF's url, like: https://stf.example.org
STF_URL = ""

Example Code

Basic usage

Get all the devices information on the STF

serial = 'NX529J'
token = 'xx-xxx-xx'
stf = STF(token)
devices =  stf.devices()
print devices

Get specific devices information on the STF

device_info = stf.device(serial)
print device_info['remoteConnectUrl']

Use a device. This is analogous to pressing "Use" in the UI.

stf.use_device(serial)

Retrieve the remote debug URL

remote_connect_url = stf.connect_device(serial)
print remote_connect_url

Disconnect a remote debugging session.

stf.disconnect_device(serial)

Stop use device. This is analogous to pressing "Stop using" in the UI.

stf.stop_use_device(serial)

About

This a python util allows you to reserve and release any STF device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages