Skip to content

Instantly share code, notes, and snippets.

@Vinai
Created February 17, 2016 20:42
Show Gist options
  • Save Vinai/8ffb4c910ceb66933706 to your computer and use it in GitHub Desktop.
Save Vinai/8ffb4c910ceb66933706 to your computer and use it in GitHub Desktop.
Magento 2 integration test phpunit.xml file with Mage2Katas testsuite configuration.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
colors="true"
bootstrap="./framework/bootstrap.php"
>
<!-- Test suites definition -->
<testsuites>
<!-- Memory tests run first to prevent influence of other tests on accuracy of memory measurements -->
<testsuite name="Memory Usage Tests">
<file>testsuite/Magento/MemoryUsageTest.php</file>
</testsuite>
<testsuite name="Magento Integration Tests">
<directory suffix="Test.php">testsuite</directory>
<directory suffix="Test.php">../../../update/dev/tests/integration/testsuite</directory>
<exclude>testsuite/Magento/Test/Integrity</exclude>
<exclude>testsuite/Magento/MemoryUsageTest.php</exclude>
</testsuite>
<testsuite name="Mage2Kata Integration Tests">
<directory>../../../app/code/*/*/Test/Integration</directory>
<exclude>../../../app/code/Magento</exclude>
</testsuite>
</testsuites>
<!-- Code coverage filters -->
<filter>
<whitelist>
<directory suffix=".php">../../../app/code/Magento</directory>
<directory suffix=".php">../../../lib/internal/Magento</directory>
<directory suffix=".php">../../../update/app/code</directory>
<exclude>
<directory>../../../app/code/*/*/Test</directory>
<directory>../../../lib/internal/*/*/Test</directory>
<directory>../../../lib/internal/*/*/*/Test</directory>
<directory>../../../setup/src/*/*/Test</directory>
<directory>../../../update/app/code/*/*/Test</directory>
</exclude>
</whitelist>
</filter>
<!-- PHP INI settings and constants definition -->
<php>
<includePath>.</includePath>
<includePath>testsuite</includePath>
<ini name="date.timezone" value="America/Los_Angeles"/>
<ini name="xdebug.max_nesting_level" value="200"/>
<ini name="memory_limit" value="-1"/>
<!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
<const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/>
<!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
<const name="TESTS_GLOBAL_CONFIG_FILE" value="etc/config-global.php"/>
<!-- Semicolon-separated 'glob' patterns, that match global XML configuration files -->
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
<!-- Whether to cleanup the application before running tests or not -->
<const name="TESTS_CLEANUP" value="disabled"/>
<!-- Memory usage and estimated leaks thresholds -->
<!--<const name="TESTS_MEM_USAGE_LIMIT" value="1024M"/>-->
<const name="TESTS_MEM_LEAK_LIMIT" value=""/>
<!-- Whether to output all CLI commands executed by the bootstrap and tests -->
<!--<const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>-->
<!-- Path to Percona Toolkit bin directory -->
<!--<const name="PERCONA_TOOLKIT_BIN_DIR" value=""/>-->
<!-- CSV Profiler Output file -->
<!--<const name="TESTS_PROFILER_FILE" value="profiler.csv"/>-->
<!-- Bamboo compatible CSV Profiler Output file name -->
<!--<const name="TESTS_BAMBOO_PROFILER_FILE" value="profiler.csv"/>-->
<!-- Metrics for Bamboo Profiler Output in PHP file that returns array -->
<!--<const name="TESTS_BAMBOO_PROFILER_METRICS_FILE" value="../../build/profiler_metrics.php"/>-->
<!-- Magento mode for tests execution. Possible values are "default", "developer" and "production". -->
<const name="TESTS_MAGENTO_MODE" value="developer"/>
<!-- Minimum error log level to listen for. Possible values: -1 ignore all errors, and level constants form http://tools.ietf.org/html/rfc5424 standard -->
<const name="TESTS_ERROR_LOG_LISTENER_LEVEL" value="-1"/>
<!-- Connection parameters for MongoDB library tests -->
<!--<const name="MONGODB_CONNECTION_STRING" value="mongodb://localhost:27017"/>-->
<!--<const name="MONGODB_DATABASE_NAME" value="magento_integration_tests"/>-->
</php>
<!-- Test listeners -->
<listeners>
<listener class="Magento\TestFramework\Event\PhpUnit"/>
<listener class="Magento\TestFramework\ErrorLog\Listener"/>
</listeners>
</phpunit>
@jrosell
Copy link

jrosell commented Sep 10, 2016

Thanks Vinai. May be 0 video of Mage2Katas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment