1. Go to this page and download the library: Download qase/pest-reporter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
qase / pest-reporter example snippets
use function Qase\PestReporter\qase;
it('logs in successfully', function () {
qase()
->caseId(123)
->title('Login Test')
->suite('Auth', 'Login')
->field('priority', 'high')
->parameter('browser', 'chrome')
->step('Open login page')
->step('Submit credentials', function () {
expect(true)->toBeTrue();
})
->comment('Testing login functionality')
->attach('/path/to/screenshot.png');
});
use Qase\PestReporter\Qase;
it('logs in successfully', function () {
Qase::caseId(123);
Qase::title('Login Test');
Qase::comment('Testing login');
expect(true)->toBeTrue();
});
it('adds numbers', function (int $a, int $b, int $expected) {
qase()->caseId(100);
expect($a + $b)->toBe($expected);
})->with([
'one plus one' => [1, 1, 2],
'two plus two' => [2, 2, 4],
]);
describe('Authentication', function () {
describe('Login', function () {
it('logs in with valid credentials', function () {
qase()->caseId(1)->comment('Testing login');
expect(true)->toBeTrue();
});
});
});
// Or set manually:
it('test with custom suite', function () {
qase()->suite('API', 'Users', 'Create');
expect(true)->toBeTrue();
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.