2017 © Pedro Peláez
 

library denetmen-bundle

Url testing tool for symfony2 projects.

image

mstfleri/denetmen-bundle

Url testing tool for symfony2 projects.

  • Friday, March 31, 2017
  • by mustafaileri
  • Repository
  • 5 Watchers
  • 50 Stars
  • 1,269 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 8 Versions
  • 3 % Grown

The README.md

DenetmenBundle Build Status

About

Denetmen is a url testing tool for Symfony2 projects via Guzzle * Test your get url. * Mock your urls for testing. * Apply response validators for your result. * Get email notification when your pages are nor working correctly., (*1)

Screenshot, (*2)

Installation

For Symfony >= 2.0

Require the bundle in your composer.json file:, (*3)

{
    "require": {
        "mstfleri/denetmen-bundle": "dev-master"
    }
}

Install the bundle:, (*4)

$ composer update mstfleri/denetmen-bundle

Register the bundle:, (*5)

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        new \Hezarfen\DenetmenBundle\HezarfenDenetmenBundle()
    );
}

That's all!, (*6)

Usage

Configure your routes in parameters section., (*7)

Add denetmen.yml into your config.yml, (*8)

#app/config/config.yml
imports:
    - { resource: denetmen.yml }
    ...

Configuration Parameters

Define excluded routings in excluded segment., (*9)

Define general parameters in router_configs.general segment., (*10)

Define parameter by routing key in router_configs.routing_key., (*11)

#app/config/denetmen.yml
parameters:
    denetmen:
        base_url: "http://localhost:8000/"
        excluded:
            - "_wdt"
            - "_profiler"
            - "_configurator"
            - "_acme_demo"
            - "_profiler_info"
        router_configs:
            general:
                id: 1
                name: "Mustafa"

            get_bin_number_routing_key:
                parameters:
                  cardNumber: 1122334455667788

            get_user_routing_key:
                parameters:
                    id: 1

For these routings:, (*12)

get_bin_number_routing_key:
    pattern:  /check-bin/{cardNumber}
    defaults: { _controller: YourPaymentBundle:Default:getBinNumber }
    methods:  [GET]

get_user_routing_key:
    pattern:  /user/{id}
    defaults: { _controller: YourUserBundle:Default:getUser }
    methods:  [GET]

Url requests will be generated:, (*13)

    [GET] http://localhost:8000/check-bin/1122334455667788
    [GET] http://localhost:8000//user/1

Response Validators

You can define reponse validations, (*14)

  • type: You can define response type validator.
  • max_response_time: You can define maximum response time.
  • filter > node_traversing: You can define selector and value of selector.

Example:, (*15)

#app/config/denetmen.yml
        ...
        router_configs:
            ...

            get_user_routing_key:
              parameters:
                id: 1
              response:
                type: "text/html; charset=UTF-8"
                filter: 
                  node_traversing: 
                    - ['body > header >  div > nav > ul > li', 'Content1']
                    - ['body > header > div.top > nav > ul:nth-child(1) > li:nth-child(2) > a', 'Content2']
                  max_response_time: 0.5
            ...
        ...    

How to run?

$app/console  denetmen:run:url-test

Or you can use regex for routers.

You can filter your routes, (*16)

Example: Filter by starting with "get_", (*17)

$app/console  denetmen:run:url-test --pattern='#^get_(.*)$#i'

Activate email notification:

You can activate email notification when one of your routers has any error., (*18)

$app/console  denetmen:run:url-test  --alert-email='youremail@yourdomain.com'

MIT License

License can be found here., (*19)

Authors

The bundle was originally created by Mustafa İleri. See the list of contributors., (*20)

The Versions

31/03 2017

dev-master

9999999-dev

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

bdd testing urltester

22/03 2014

0.1.5.x-dev

0.1.5.9999999-dev

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

bdd testing urltester

22/03 2014

0.1.5

0.1.5.0

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

bdd testing urltester

28/02 2014

0.1.4

0.1.4.0

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

bdd testing urltester

28/02 2014

0.1.3

0.1.3.0

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

28/02 2014

0.1.2

0.1.2.0

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

25/02 2014

0.1.1

0.1.1.0

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri

25/02 2014

0.1.0

0.1.0.0

Url testing tool for symfony2 projects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar mustafaileri