getJob() публичный Метод

Get full information for job: /rest/v1/:userId/jobs/:jobId (GET)
public getJob ( string $jobId ) : array
$jobId string
Результат array
Пример #1
0
 /**
  * Verify how the API calls were made.
  *
  * @param TestEvent $event Event.
  *
  * @return void
  */
 public function verifyRemoteAPICalls(TestEvent $event)
 {
     $test_case = $event->getTestCase();
     if (get_class($test_case) !== get_class($this) || $test_case->getName() !== $this->getName()) {
         return;
     }
     $browser = $this->getBrowser();
     if ($browser instanceof SauceLabsBrowserConfiguration) {
         $session = $event->getSession();
         if ($session === null) {
             $this->markTestSkipped('Unable to connect to SauceLabs. Please check Internet connection.');
         }
         $sauce_rest = new SauceRest($browser->getApiUsername(), $browser->getApiKey());
         $job_info = $sauce_rest->getJob($session->getDriver()->getWebDriverSessionId());
         $this->assertEquals(get_class($test_case) . '::' . $test_case->getName(), $job_info['name']);
         $passed_mapping = array('testSuccess' => true, 'testFailure' => false);
         $this->assertSame($passed_mapping[$test_case->getName()], $job_info['passed']);
     }
 }
Пример #2
0
 /**
  * Returns information about session.
  *
  * @param string $session_id Session ID.
  *
  * @return array
  */
 public function getInfo($session_id)
 {
     return $this->_sauceRest->getJob($session_id);
 }