PHP 클래스 WebDriver\SauceLabs\SauceRest

파일 보기 프로젝트 열기: instaclick/php-webdriver 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $userId, string $accessKey ) Constructor
createSubAccount ( array $accountInfo ) : array Create new sub-account: /rest/v1/users/:userId (POST)
deleteJob ( string $jobId ) : array Delete job: /rest/v1/:userId/jobs/:jobId (DELETE)
getAccountDetails ( string $userId ) : array Get account details: /rest/v1/users/:userId (GET)
getAccountLimits ( ) : array Check account limits: /rest/v1/limits (GET)
getActivity ( ) : array Get current account activity: /rest/v1/:userId/activity (GET)
getBrowsers ( string $termination = false ) : array Get currently supported browsers: /rest/v1/info/browsers (GET)
getCounter ( ) : array Get number of tests executed so far on Sauce Labs: /rest/v1/info/counter (GET)
getJob ( string $jobId ) : array Get full information for job: /rest/v1/:userId/jobs/:jobId (GET)
getJobs ( boolean $full = null ) : array Get jobs: /rest/v1/:userId/jobs (GET)
getStatus ( ) : array Get current status of Sauce Labs' services: /rest/v1/info/status (GET)
getTunnel ( string $tunnelId ) : array Get full information for a tunnel: /rest/v1/:userId/tunnels/:tunnelId (GET)
getTunnels ( ) : array Get running tunnels for a given user: /rest/v1/:userId/tunnels (GET)
getUsage ( string $start = null, string $end = null ) : array Get historical account usage: /rest/v1/:userId/usage (GET)
shutdownTunnel ( string $tunnelId ) : array Shut down a tunnel: /rest/v1/:userId/tunnels/:tunnelId (DELETE)
stopJob ( string $jobId ) : array Stop job: /rest/v1/:userId/jobs/:jobId/stop (PUT)
unsubscribeSubAccount ( string $userId ) : array Unsubscribe a sub-account: /rest/v1/users/:userId/subscription (DELETE)
updateJob ( string $jobId, array $jobInfo ) : array Update existing job: /rest/v1/:userId/jobs/:jobId (PUT)
updateSubAccount ( string $userId, string $plan ) : array Update sub-account service plan: /rest/v1/users/:userId/subscription (POST)

보호된 메소드들

메소드 설명
execute ( string $requestMethod, string $url, mixed $parameters = null ) : mixed Execute Sauce Labs REST API command

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $userId, string $accessKey )
$userId string Your Sauce user name
$accessKey string Your Sauce API key

createSubAccount() 공개 메소드

For "partners", $accountInfo also contains 'plan' => (one of 'free', 'small', 'team', 'com', or 'complus')
public createSubAccount ( array $accountInfo ) : array
$accountInfo array array('username' => ..., 'password' => ..., 'name' => ..., 'email' => ...)
리턴 array array('access_key' => ..., 'minutes' => ..., 'id' => ...)

deleteJob() 공개 메소드

Delete job: /rest/v1/:userId/jobs/:jobId (DELETE)
public deleteJob ( string $jobId ) : array
$jobId string
리턴 array

execute() 보호된 메소드

Execute Sauce Labs REST API command
또한 보기: http://saucelabs.com/docs/saucerest
protected execute ( string $requestMethod, string $url, mixed $parameters = null ) : mixed
$requestMethod string HTTP request method
$url string URL
$parameters mixed Parameters
리턴 mixed

getAccountDetails() 공개 메소드

Get account details: /rest/v1/users/:userId (GET)
public getAccountDetails ( string $userId ) : array
$userId string
리턴 array

getAccountLimits() 공개 메소드

Check account limits: /rest/v1/limits (GET)
public getAccountLimits ( ) : array
리턴 array

getActivity() 공개 메소드

Get current account activity: /rest/v1/:userId/activity (GET)
public getActivity ( ) : array
리턴 array

getBrowsers() 공개 메소드

Get currently supported browsers: /rest/v1/info/browsers (GET)
public getBrowsers ( string $termination = false ) : array
$termination string Optional termination (one of "all", "selenium-rc", or "webdriver')
리턴 array

getCounter() 공개 메소드

Get number of tests executed so far on Sauce Labs: /rest/v1/info/counter (GET)
public getCounter ( ) : array
리턴 array

getJob() 공개 메소드

Get full information for job: /rest/v1/:userId/jobs/:jobId (GET)
public getJob ( string $jobId ) : array
$jobId string
리턴 array

getJobs() 공개 메소드

Get jobs: /rest/v1/:userId/jobs (GET)
public getJobs ( boolean $full = null ) : array
$full boolean
리턴 array

getStatus() 공개 메소드

Get current status of Sauce Labs' services: /rest/v1/info/status (GET)
public getStatus ( ) : array
리턴 array array('wait_time' => ..., 'service_operational' => ..., 'status_message' => ...)

getTunnel() 공개 메소드

Get full information for a tunnel: /rest/v1/:userId/tunnels/:tunnelId (GET)
public getTunnel ( string $tunnelId ) : array
$tunnelId string
리턴 array

getTunnels() 공개 메소드

Get running tunnels for a given user: /rest/v1/:userId/tunnels (GET)
public getTunnels ( ) : array
리턴 array

getUsage() 공개 메소드

Get historical account usage: /rest/v1/:userId/usage (GET)
public getUsage ( string $start = null, string $end = null ) : array
$start string Optional start date YYYY-MM-DD
$end string Optional end date YYYY-MM-DD
리턴 array

shutdownTunnel() 공개 메소드

Shut down a tunnel: /rest/v1/:userId/tunnels/:tunnelId (DELETE)
public shutdownTunnel ( string $tunnelId ) : array
$tunnelId string
리턴 array

stopJob() 공개 메소드

Stop job: /rest/v1/:userId/jobs/:jobId/stop (PUT)
public stopJob ( string $jobId ) : array
$jobId string
리턴 array

unsubscribeSubAccount() 공개 메소드

Unsubscribe a sub-account: /rest/v1/users/:userId/subscription (DELETE)
public unsubscribeSubAccount ( string $userId ) : array
$userId string User ID
리턴 array

updateJob() 공개 메소드

Update existing job: /rest/v1/:userId/jobs/:jobId (PUT)
public updateJob ( string $jobId, array $jobInfo ) : array
$jobId string Job ID
$jobInfo array Job information
리턴 array

updateSubAccount() 공개 메소드

Update sub-account service plan: /rest/v1/users/:userId/subscription (POST)
public updateSubAccount ( string $userId, string $plan ) : array
$userId string User ID
$plan string Plan
리턴 array