function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
XactAndyXactAndy 

Error uploading a package

Hi,

I recently decided to upload my beta app, and got the following error:

There are problems that prevent this package from being uploaded.



No testMethods found in the selected Apex code for the package

for one of my Apex triggers.

I have uploaded this package without any problems before, and used the Eclipse
IDE to upload the triggers separately. Has something changed, and how can
I go about fixing it? I can't see a way of removing the triggers from the contents
of the package.

Andy


JonPJonP
Hi Andy,

When you Run Tests from Eclipse, what is your reported code coverage?

Most likely the solution is to add an Apex Class to your package containing one or more TestMethods that exercise the code in your trigger.  Once you have achieved the required code coverage for deploying Apex to production (75% or more), you should be able to upload your package to the AppExchange.

Jon
willingwilling

I also have the same issue. I am trying to uplaod package from Sandbox

I have the test classes and coverage is more than 75%

GregCGregC
Previous to the release of Spring 08 Apex code was not packageable, so if you had it in your DE org and uploaded a package it would not have been included in the package. Post Spring 08 any Apex classes or triggers that cause dependencies on items that are in your package will be automatically included and will have to have sufficient text coverage. So a package you uploaded pre-spring 08 may have different requirements and components post spring 08.