68 lines
		
	
	
	
		
			2.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
	
		
			2.7 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
uuid:
 | 
						|
  - value: 9ecc8bf3-5bf6-4713-9868-c6059db4d432
 | 
						|
langcode:
 | 
						|
  - value: en
 | 
						|
type:
 | 
						|
  - target_id: daily_email
 | 
						|
    target_type: node_type
 | 
						|
    target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
 | 
						|
revision_timestamp:
 | 
						|
  - value: '2025-05-11T09:00:20+00:00'
 | 
						|
revision_uid:
 | 
						|
  - target_type: user
 | 
						|
    target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
 | 
						|
revision_log: {  }
 | 
						|
status:
 | 
						|
  - value: true
 | 
						|
uid:
 | 
						|
  - target_type: user
 | 
						|
    target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
 | 
						|
title:
 | 
						|
  - value: 'Running tests in parallel with Paratest'
 | 
						|
created:
 | 
						|
  - value: '2024-02-07T00:00:00+00:00'
 | 
						|
changed:
 | 
						|
  - value: '2025-05-11T09:00:20+00:00'
 | 
						|
promote:
 | 
						|
  - value: false
 | 
						|
sticky:
 | 
						|
  - value: false
 | 
						|
default_langcode:
 | 
						|
  - value: true
 | 
						|
revision_translation_affected:
 | 
						|
  - value: true
 | 
						|
path:
 | 
						|
  - alias: /daily/2024/02/07/running-tests-in-parallel-with-paratest
 | 
						|
    langcode: en
 | 
						|
body:
 | 
						|
  - value: |
 | 
						|
      <p>Something that I've recently added to my PHP projects is <a href="https://github.com/paratestphp/paratest">Paratest</a>.</p>
 | 
						|
 | 
						|
      <p>It adds parallel testing to PHPUnit, so your tests will be run in parallel instead of sequentially.</p>
 | 
						|
 | 
						|
      <p>For the example module in my <a href="/atdc">automated testing in Drupal email course</a>, using Paratest reduces the execution time from ~16 seconds to ~8 seconds.</p>
 | 
						|
 | 
						|
      <p>In a client project with 136 tests, it reduces the time from four and a half minutes to less than two minutes.</p>
 | 
						|
 | 
						|
      <p>This is a big improvement just from running a single Composer command to add Paratest.</p>
 | 
						|
 | 
						|
      <p>There's also <a href="https://www.drupal.org/project/drupal/issues/2781123">an open issue</a> for using it for Drupal core's tests, which is something I'll keep an eye on and will look to contribute to.</p>
 | 
						|
 | 
						|
              
 | 
						|
    format: full_html
 | 
						|
    processed: |
 | 
						|
      <p>Something that I've recently added to my PHP projects is <a href="https://github.com/paratestphp/paratest">Paratest</a>.</p>
 | 
						|
 | 
						|
      <p>It adds parallel testing to PHPUnit, so your tests will be run in parallel instead of sequentially.</p>
 | 
						|
 | 
						|
      <p>For the example module in my <a href="/atdc">automated testing in Drupal email course</a>, using Paratest reduces the execution time from ~16 seconds to ~8 seconds.</p>
 | 
						|
 | 
						|
      <p>In a client project with 136 tests, it reduces the time from four and a half minutes to less than two minutes.</p>
 | 
						|
 | 
						|
      <p>This is a big improvement just from running a single Composer command to add Paratest.</p>
 | 
						|
 | 
						|
      <p>There's also <a href="https://www.drupal.org/project/drupal/issues/2781123">an open issue</a> for using it for Drupal core's tests, which is something I'll keep an eye on and will look to contribute to.</p>
 | 
						|
 | 
						|
              
 | 
						|
    summary: null
 | 
						|
field_daily_email_cta: {  }
 |