question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apex: Unit test results show only 2,000 results when more results exist

See original GitHub issue

Summary

When an org has over 2,000 local test methods, and all local tests are run, only 2,000 results will be included in the test output file.

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc-unit-test-issue.zip

  1. Run the bin/install-scratch.sh script
  2. Run sfdx force:apex:test:run --resultformat human --wait 60 --outputdir ./tests/apex

Expected result

The results file in /tests/apex will contain 2157 results

Actual result

The results file in /tests/apex will contain 2000 results

Additional information

The sample project is the vanilla lwc dreamhouse project with the addition of one test class that contains over 2k test methods.

Navigating to the test execution history in the Setup UI in the scratch org will show the correct number of test results:

Screen Shot 2021-05-07 at 10 10 11 AM

We believe this issue started with the 51.7.1 (April 8, 2021) - CLI 7.96.1 release

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

7.99.0

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

51.12.0

OS and version:

macOS 10.15.7 (19H524)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
brpowellcommented, May 27, 2021

This was also addressed in v51.15.0 of the extensions

1reaction
AnanyaJhacommented, May 26, 2021

Hi @jwalke! This issue has been addressed by release v0.2.1 of the Apex plugin. To access these changes, please run sfdx plugins:install apex@0.2.1. The plugin version can be verified by running sfdx plugins.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apex: Unit test results show only 2,000 results when ... - GitHub
When an org has over 2,000 local test methods, and all local tests are run, only 2,000 results will be included in the...
Read more >
Topics in Apex unit tests - Salesforce Developer Community
I am testing an Apex class that queries topics. When creating test data, I am running into an issue with regards to Topics....
Read more >
Apex Unit Test giving different results for SOQL query when ...
In order to do so, I'm using the System. runAs method. I was getting weird results, and narrowed it down to the fact...
Read more >
Execute tests and analyze results - JetBrains Rider
Whichever way you choose, execution progress, test results, and output are displayed in the Unit Tests window , coverage results are shown in...
Read more >
Apex Developer Guide - Salesforce Implementation guides
It includes test results that indicate how much code is covered, ... to the arguments exist only within the scope of the method....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found