{"id":16150169,"url":"https://github.com/ousamabenyounes/log2test","last_synced_at":"2025-08-02T08:43:30.213Z","repository":{"id":57034071,"uuid":"64421638","full_name":"ousamabenyounes/Log2test","owner":"ousamabenyounes","description":"Log2Test is a PHP tool that allows you to transform your Production Log into tests (phpCurl, phpunitSelenium...).","archived":false,"fork":false,"pushed_at":"2021-03-27T21:24:18.000Z","size":4514,"stargazers_count":24,"open_issues_count":5,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T18:50:08.963Z","etag":null,"topics":["apache","curl","logs","nginx","phpunit","selenium","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ousamabenyounes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-28T19:13:29.000Z","updated_at":"2022-03-23T20:33:42.000Z","dependencies_parsed_at":"2022-08-24T06:50:20.318Z","dependency_job_id":null,"html_url":"https://github.com/ousamabenyounes/Log2test","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ousamabenyounes/Log2test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousamabenyounes%2FLog2test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousamabenyounes%2FLog2test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousamabenyounes%2FLog2test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousamabenyounes%2FLog2test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ousamabenyounes","download_url":"https://codeload.github.com/ousamabenyounes/Log2test/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousamabenyounes%2FLog2test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268356090,"owners_count":24237380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","curl","logs","nginx","phpunit","selenium","testing-tools"],"created_at":"2024-10-10T00:47:41.967Z","updated_at":"2025-08-02T08:43:30.137Z","avatar_url":"https://github.com/ousamabenyounes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log2test\n\n[![Monthly Downloads](https://poser.pugx.org/ousamabenyounes/log2test/d/monthly.png)](https://packagist.org/packages/ousamabenyounes/log2test)  [![Build Status](https://travis-ci.org/ousamabenyounes/log2test.svg?branch=dev)](https://travis-ci.org/ousamabenyounes/log2test) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d9e3c01e-7bea-4705-8b0b-f6273dac5b09/mini.png)](https://insight.sensiolabs.com/projects/d9e3c01e-7bea-4705-8b0b-f6273dac5b09)\n\nLog2Test is a PHP application that allows you to **transform your Production Log into test**.  \nYou can export your log to the following stack:  \n- **Curl**: Php Multi Curl Test =\u003e A good solution if you have huge apache2 log file or if you don't need to run JavaScript or Ajax calls  \n- **PhpunitCurl**:  Phpunit Curl test   \n- **PhpunitSelenium**: Allows you to open all your log file urls' on defined browsers you need to test  \n\nWhy exporting your production log files to tests?\n\n- Be able to **find broken links**  \n- Detect Blank/Empty web pages (When a 500 error occurs and no error redirection page is enabled)\n- Before deploying new features to production, you can **easily launch real tests on your pre-production environment**  \n- Launching all your access log on different browsers with Selenium allows you to **validate Cross Browser Compatibility**  \n\n# Install\n\n```\ngit clone https://github.com/ousamabenyounes/log2test \ncomposer install\n```\n\n# How to use\n\n**Let's now see how Log2Test works step by step as seen on the screencast gif file bellow**\n- At the beginning, there are **no existing tests** in the \"generated/Curl\" directory\n- Given this context:\n  - A configuration file (Yaml File) -\u003e config/parameters-log2test.yml   \n  - An Apache2 Access Log file -\u003e log/test.log   \n- Running **./bin/log2test** command will **generate and run all your tests**  \n\n\u003cimg src=\"web/images/log2testCurl.gif\"\u003e\u003c/img\u003e\n\n# Configuration\n\nOpen configuration file:  \n\n```\nconfig/parameters-log2test.yml \n```\n\n\nHere are all the configuration file's properties:\n\n| Property | Type | Description | Default | \n|:----------:|:-------------:|:-------------:|---------------|\n| hostConfig | String | Array | List of hosts to parse [see samples here](#host-sample) | |\n| logFile | String | Path to your access log file | log/test.log |\n| testStack | String | Available test stack: \"PhpunitSelenium\" or \"Curl\" or \"PhpunitCurl | Curl |\n| beginLine | Int | Begin parsing at line X | 0 |\n| numberOfLine | Int | Number of lines to parse | 300 |\n| logParserClass | String | Your log parsing class | \\Log2Test\\Parser\\Log\\Apache2LogParser |\n| logFormat | String | Detail the log format of your acces log file | '%h %l %u %t \\\"%r\\\" %\u003es %b' |\n| extensions_allowed | Array | Only parse files matching these extentions | [php, html] |\n| browsers | Array | List of browsers -\u003e only for phpunit_selenium stack | chrome |  \n| removeDuplicateUrl | Boolean | If you want to remove duplicate urls | true |\n| pauseBetweenTests | Int | Add a pause between all generated tests | 0 |\n| encodedUrls | Boolean | Allows you to encode all parsed urls | true |\n| enabledScreenshot | Boolean | Take a screenshot on each test | false |\n| testResultFormat | string | Test result format \"xml\" or \"json\" | xml |\n\n\n\n\n# Requirements\nPhpunit  \nSelenium Server (only needed if you choose phpunit_selenium as your test stack)  \n\n\n# Test\nLog2test is tested with PHPUNIT \u0026 Behat\n\n```\n./bin/phpunit \n\n./bin/behat\n```\n\nOn each commit, a complete build is launched on http://travis-ci.org/ousamabenyounes/log2test/\n\n### Host Sample\n\nYou can provide a simple  strings like this:\n\n```php\n\"www.shop2tout.com\"\n```\n\nYou can also provide an array with source / destination value\n\n```php\n    [\"www.shop2tout.com\", \"www.shop2tout.local\"],\n\n```\n\nThe first case is the source host you will be searching on your apache logs  \nThe second case is the destination host which will be used on generated tests  \n**We recommend using the second format**, so your production website is not affected by the heavy tests you'll launch'\n\n# Todo\nAdd Global Reporting  \nAdd YellowLabTools option on parsing\n\n## Contributors\n- Ousama Ben Younes [ousamabenyounes](https://github.com/ousamabenyounes)\n- Youval Teboul [youvalteboul](https://github.com/youvalteboul)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousamabenyounes%2Flog2test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fousamabenyounes%2Flog2test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousamabenyounes%2Flog2test/lists"}