PHPackages                             stepapo/url-tester - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. stepapo/url-tester

ActiveLibrary[Testing &amp; Quality](/categories/testing)

stepapo/url-tester
==================

Tester for Nette web applications.

0.4.0(2y ago)0293MITPHPPHP &gt;=8.1

Since Jun 17Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/stepapo/request-tester)[ Packagist](https://packagist.org/packages/stepapo/url-tester)[ Docs](https://github.com/stepapo/url-tester)[ RSS](/packages/stepapo-url-tester/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (8)Used By (0)

Request Tester
==============

[](#request-tester)

Request Tester is an extension for Nette Framework used for testing web applications. It validates rendered content based on what path is requested, which user is logged in or what data was submitted through a form. The docs show basic example and explain ways of configurating tests.

Example
-------

[](#example)

Let's define a test for submiting an authorization form on url `//example.com/auth`.

### Definition

[](#definition)

Use `tests/config/authorization.neon` to define a test:

```
name: authorization
path: auth
requests:
    with wrong name:
        form:
            name: signupForm
            post:
                login: WRONG_NAME
                password: secret1234
        asserts:
            renders: This login does not exist
    with wrong passowrd:
        form:
            name: signupForm
            post:
                login: name@example.com
                password: WRONG_PASSWORD
        asserts:
            renders: The password is wrong
    with wrong address:
        path: auht
        asserts:
            httpCode: 404
    with correct input:
        form:
            name: signupForm
            post:
                login: name@example.com
                password: secret1234
        asserts:
            renders: Login successful
```

### Data provider

[](#data-provider)

Use `tests/config.php` to collect all test definitions and include them in data provider for Nette Tester:

```
require __DIR__ . '/../vendor/autoload.php';

$return = [];

foreach (Nette\Utils\Finder::findFiles('*.neon')->from(__DIR__ . '/config') as $file) {
    $config = (array) Nette\Neon\Neon::decode(Nette\Utils\FileSystem::read($file));
    $return[$config['name']] = $config;
}

return $return;
```

### Test case

[](#test-case)

Create `tests/PresenterTest.php` test case:

```
$container = App\Bootstrap::bootForTests()->createContainer();

/**
 * @testCase
 * @dataProvider config.php
 */
class PresenterTest extends Stepapo\RequestTester\Tester\TestCase
{
}

$container->createInstance(PresenterTest::class, [Nette\Tester\Environment::loadData()])->run();
```

### Runner setup

[](#runner-setup)

Specific URL Tester printer can be used for outputing results instead of basic Nette Tester printer. To do that, create `tests/runner-setup.php`:

```
require __DIR__ . '/../vendor/autoload.php';

$runner->outputHandlers[] = new Stepapo\RequestTester\Tester\RequestOutputHandler(
    $runner,
    require __DIR__ . '/config.php',
);
```

### Run

[](#run)

To run tests use standard Nette Tester command. Make sure testing database is prepared and temp folder is cleared.

Basic command:

```
$ tester tests

```

Command with setup:

```
$ tester --setup tests/runner-setup.php -o none -c tests/php.ini --coverage tests/coverage.html --coverage-src app -j 8 --cider tests

```

Configuration
-------------

[](#configuration)

NEON files are used to configure test scenarios. They can be separated in following parts.

### Test

[](#test)

Test is defined by `name` and list of `requests`.

```
name: authorization
requests:
    example request: # include Request configuration
    another example request: # include Request configuration
```

### Request

[](#request)

Request configuration requires `path` and `asserts`. Use `identity` to specify which user should be logged. Use `form` if you want to submit a form. `requests` can be used to specify subrequests that inherit parent request configuration and override some of it with their own if needed.

```
path: auth
identity: # include Identity configuration
form: # include Form configuration
asserts: # include Assert configuration
requests:
    example subrequest: # include Request configuration
    another example subrequest: # include Request configuration
```

### Identity

[](#identity)

`id` of logged user is required.

```
id: 1
roles:
    - user
    - admin
```

### Form

[](#form)

```
name: signupForm
post:
    login: name@domain.com
    password: secret1234
```

### Assert

[](#assert)

Validating bad request:

```
httpCode: 404
```

Validating what is rendered in browser or not:

```
renders:
    - Login successful
notRenders:
    - Login required
```

Validating result of API call:

```
json:
    id: 1
    name: John Doe
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance44

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~162 days

Recently: every ~82 days

Total

7

Last Release

823d ago

PHP version history (2 changes)0.1.0PHP &gt;=8.0

0.4.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c875fb85cb069c6c498038f0b7284592bb1542447c8f57dec00411b990510dd5?d=identicon)[stepapo](/maintainers/stepapo)

---

Top Contributors

[![stepapo](https://avatars.githubusercontent.com/u/11784270?v=4)](https://github.com/stepapo "stepapo (49 commits)")

---

Tags

urlwebnettetester

### Embed Badge

![Health badge](/badges/stepapo-url-tester/health.svg)

```
[![Health](https://phpackages.com/badges/stepapo-url-tester/health.svg)](https://phpackages.com/packages/stepapo-url-tester)
```

###  Alternatives

[behat/mink

Browser controller/emulator abstraction for PHP

1.6k86.1M606](/packages/behat-mink)[nette/tester

Nette Tester: enjoyable unit testing in PHP with code coverage reporter. 🍏🍏🍎🍏

4917.3M1.5k](/packages/nette-tester)[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[friends-of-behat/mink-extension

Mink extension for Behat

14034.2M467](/packages/friends-of-behat-mink-extension)[drupal/drupal-driver

A collection of reusable Drupal drivers

6715.8M18](/packages/drupal-drupal-driver)[zoon/puphpeteer

A Puppeteer bridge for PHP, supporting the entire API.

204192.9k1](/packages/zoon-puphpeteer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
