Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6688171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:22:26+00:00 2026-05-26T05:22:26+00:00

I have ~700 tests with ~1500 assertions, tests are running on sqlite on RAM

  • 0

I have ~700 tests with ~1500 assertions, tests are running on sqlite on RAM drive. I run this using phpunit /dir/name, without any additional suite setup.

The tests are written well (I hope so), the app and each one test runs fast and the memory usage for each one is not big (never bigger than 10M).

Everything is ok once the tests are running separated. But when I run all the tests together,
PHPUnit reports memory usage about 450MB.

  • Is 500M ok? Shall I update the memory_limit to 700MB to be safe?
  • How to avoid such a memory usage?

I understand that the answer is depends on the app, but I wonder which memory level can tests for a medium level app reach.

Update:

We are using transactions and rollback db changes in tearDown()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:22:26+00:00Added an answer on May 26, 2026 at 5:22 am

    PHPUnit instantiates a test case for each test method and each argument array for each data provider before running any tests. To boot, any exception and assertion failure has a reference to the instance that threw it. This makes it very important to unset any instance variables you assigned to the test in tearDown() as MasterCassim said.

    But it mainly means that you have to accept a growing memory requirement as the number of tests increase. If you generate code coverage as well this jumps considerably. Our main website project runs with a limit of 2GB.

    You can run the tests in separate processes, but you’ll pay a high price in increased run times.

    Note: Issue #10 is supposed to address this, but I don’t know what the status of it is in 3.6.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data set that is around 700 rows with eight columns of
I have an excel spreadsheet with about 700 entries. The names are listed as
I have a SQL script which is extremely large (about 700 megabytes). I am
I have an Excel spreadsheet with 1 column, 700 rows. I care about every
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have two tables, Table A with 700,000 entries and Table B with 600,000
I have the following hash: {:charge_payable_response=>{:return=>700, :ns2=>http://ws.myws.com/}} How can I get the value of
I have an array like this (output from print_r ): Array ( [price] =>
I have this regular expression to test (\&TRUNC)[\(]{1,}(.+)[\)]{1,} And I have this tester ((((&TRUNC((1800,000

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.