+ Start a Discussion

Ant build script issues

Is there a way to ignore failing tests when deploying code to production site?  I am trying to make some changes to an existing class which has no errors and it is failing to deploy because it says there are tests that have failed. I know it runs all tests when deploying but is there a switch to disable it or maybe through eclipse you can do this? I am failing for the same reason in eclipse too.. So, Ant or eclipse solution would be great.
Well, the purpose of tests are to guarantee that the code is operating as planned, so if the tests are failing, the code should not be deployed.  Running tests from Eclipse produces pretty good error messages, in my experience.

So you should figure out what tests are failing, why they are failing, and either fix the tests or the code.

Hope this helps.
Its not the tests that im trying to deploy that are failing...For one of the tests it hasnt been changed and it just recently started to fail. And I am not trying to do anything with these tests or their triggers.. This test class when it was uploaded was at 100%...now its at 23%, this query should only return 1 row I believe..

Here is one of the queries that produced one of the errors below...

 LicenseKey__c keys = [select name, Seats_Allowed__c, BOM_Item__c from LicenseKey__c where name = :'1234567890'];

ClasstriggerLicenseTeststriggerLicenseTest283System.DmlException: Update failed. First exception on row 0 with id a0y700000000ECJAA2; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, LicenseCheck: execution of AfterUpdate

caused by: System.Exception: Too many query rows: 1001

Trigger.anotoLicenseCheck: line 10, column 6