All Projects β†’ Lloople β†’ phpunit-extensions

Lloople / phpunit-extensions

Licence: MIT license
πŸ“¦ Some cool extensions for PHPUnit

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to phpunit-extensions

Multiplatform-Log
Kotlin Multi Platform Logger, for android an ios : Logcat & print
Stars: ✭ 49 (+75%)
Mutual labels:  log
torch-dataframe
Utility class to manipulate dataset from CSV file
Stars: ✭ 67 (+139.29%)
Mutual labels:  csv
php-currency-api
Standardized wrapper for popular currency rate APIs. Currently supports FixerIO, CurrencyLayer, Open Exchange Rates and Exchange Rates API.
Stars: ✭ 17 (-39.29%)
Mutual labels:  php-package
elasticsearch-report-engine
An Elasticsearch plugin to return query results as either PDF,HTML or CSV.
Stars: ✭ 49 (+75%)
Mutual labels:  csv
dogETL
A lib to transform data from jdbc,csv,json to ecah other.
Stars: ✭ 15 (-46.43%)
Mutual labels:  csv
slack-logger
Slack logger that sends pretty formatted messages to a Slack channel.
Stars: ✭ 15 (-46.43%)
Mutual labels:  log
artemis cli
A command-line application for tutors to more productively grade programming excises on ArTEMiS
Stars: ✭ 12 (-57.14%)
Mutual labels:  csv
got
An enjoyable golang test framework.
Stars: ✭ 234 (+735.71%)
Mutual labels:  log
Emma
Emma Memory and Mapfile Analyser
Stars: ✭ 21 (-25%)
Mutual labels:  csv
grafana-csv-plugin
CSV datasource for Grafana 6.x.x / 7.x.x
Stars: ✭ 33 (+17.86%)
Mutual labels:  csv
burp-suite-http-proxy-history-converter
Python script that converts Burp Suite HTTP proxy history files to CSV or HTML
Stars: ✭ 63 (+125%)
Mutual labels:  csv
strapi-plugin-import-export-content
Csv and Json import / export content plugin to Strapi
Stars: ✭ 129 (+360.71%)
Mutual labels:  csv
COVID-19-Greece
A python-generated website for visualizing the novel coronavirus (COVID-19) data for Greece.
Stars: ✭ 21 (-25%)
Mutual labels:  csv
elastic-query-export
🚚 Export Data from ElasticSearch to CSV/JSON using a Lucene Query (e.g. from Kibana) or a raw JSON Query string
Stars: ✭ 56 (+100%)
Mutual labels:  csv
Textrude
Code generation from YAML/JSON/CSV models via SCRIBAN templates
Stars: ✭ 79 (+182.14%)
Mutual labels:  csv
tv
πŸ“Ί(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.
Stars: ✭ 1,763 (+6196.43%)
Mutual labels:  csv
awesome-georgian-datasets
Useful datasets, specific to Georgia
Stars: ✭ 47 (+67.86%)
Mutual labels:  csv
csv2xlsx
Fast and simple opensource command line tool to convert CSV do XLSX
Stars: ✭ 38 (+35.71%)
Mutual labels:  csv
ottosocial
πŸ‘ ottosocial is a CLI to schedule tweets via CSV
Stars: ✭ 23 (-17.86%)
Mutual labels:  csv
consono
The most correct, informative, appealing and configurable variable inspector for JavaScript
Stars: ✭ 17 (-39.29%)
Mutual labels:  log

PHPUnit Extensions

Latest Version on Packagist Build Status Quality Score Total Downloads Buy us a tree

This package provides you a few useful extensions for your testsuite in an effort to improve your code.

Installation

You can install the package via composer:

composer require lloople/phpunit-extensions --dev

Add the Extension to your phpunit.xml file:

<extensions>
    <extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\Console" />
</extensions>

Extensions

Console

Output the slowest tests on the console.

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\Console"/>
Showing the top 5 slowest tests:
  543 ms: Tests\Feature\ProfileTest::can_upload_new_profile_image
   26 ms: Tests\Feature\ProfileTest::can_visit_profile_page
   25 ms: Tests\Feature\ProfileTest::throws_validation_error_if_password_not_match

Default options are:

  • rows: 5 (Report 5 tests max)
  • min: 200 (Report tests slower than 200ms)

Csv

Write the tests in a CSV file ready for import.

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\Csv"/>

Default options are:

  • file: phpunit_results.csv
  • rows: null (all the tests)
  • min: 200

Json

Write the tests in a JSON file ready for import.

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\Json"/>

Default options are:

  • file: phpunit_results.json
  • rows: null (all the tests)
  • min: 200

MySQL

Store the test name and the time into a MySQL database. It will override existing records

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\MySQL"/>

Default credentials are (as array):

  • database: phpunit_results
  • table: default
  • username: root
  • password: ``
  • host: 127.0.0.1
  • rows: null (all the tests)
  • min: 200

SQLite

Store the test name and the time into a SQLite database. It will override existing records

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\SQLite"/>

Default credentials are (as array):

  • database: phpunit_results.db
  • table: default
  • rows: null (all the tests)
  • min: 200

Arguments

To override the default configuration per extension, you need to use <arguments>in your phpunit.xml file

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\Json">
  <arguments>
    <string>phpunit_results_as_json.json</string>
    <integer>10</integer> <!-- Max number of tests to report. -->
    <integer>400</integer> <!-- Min miliseconds to report a test. -->
  </arguments>
</extension>

In the case of the MySQL and SQLite, which needs a database connection, configuration goes as array

<extension class="Lloople\PHPUnitExtensions\Runners\SlowestTests\MySQL">
  <arguments>
    <array>
      <element key="database">
        <string>my_phpunit_results</string>
      </element>
      <element key="table">
        <string>project1_test_results</string>
      </element>
      <element key="username">
        <string>homestead</string>
      </element>
      <element key="password">
        <string>secret</string>
      </element>
      <element key="host">
        <string>192.168.12.14</string>
      </element>
    </array>
  </arguments>
</extension>

You don't need to override those credentials that already fit to your usecase, since the class will merge your configuration with the default one

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Treeware

You're free to use this package, but if it is really useful for you I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to Treeware's forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees here offset.earth/treeware

Read more about Treeware at treeware.earth

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].