You need to sign in to do that
Don't have an account?
EvertonSzekeres
How to identify which test class is bringing 74%
Hi,
I can't deploy anything in my organization because I always get 74%.
I read in some topics that maybe I have a test class that have 0% coverage or some other issue.
I executed all my test class and the first test class I've encountered an issue is bringing me 100% coverage in 2 of my triggers:
When I execute I get this error:
Methods defined as TestMethod do not support Web service callouts, test skipped
I can't deploy anything in my organization because I always get 74%.
I read in some topics that maybe I have a test class that have 0% coverage or some other issue.
I executed all my test class and the first test class I've encountered an issue is bringing me 100% coverage in 2 of my triggers:
@istest(seealldata=true) public class AtualizarProduto_adquirido_deleteSA_test{ static testmethod void unittest(){ Account acc=new Account(); acc.FirstName = 'Tste'; acc.LastName = 'Teste'; acc.ID_do_formando__c = 'CP7_0000_000001'; acc.Turma__c = 'a06U0000006GuHc'; acc.Nome_do_produto_adquirido__c = 'SUPER ÁLBUM'; acc.Data_da_venda_SA__c = Date.today(); acc.Situacao__c = 'VENDA APROVADA'; acc.pesquisa_de_mercado__c = '1 - Pesquisa Satisfação B2'; acc.antecipado__c = null; insert acc; Asset a=new Asset(); a.name = 'SUPER ÁLBUM'; a.Price = 1000; a.Parcelas__c = 10; a.data_do_contrato__c = date.today(); a.accountId = acc.id; a.quantity = 0; insert a; a.Status = 'Cancelado'; update a; acc.Nome_do_produto_adquirido__c = null; acc.Data_da_venda_SA__c = null; update acc; } }
When I execute I get this error:
Methods defined as TestMethod do not support Web service callouts, test skipped
I think you have some callout that is triggered by a trigger on Account or Asset object.
YOu may have to handle the future call see http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex_testing.htm for SOAP testing or http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_testing_httpcalloutmock.htm for REST/HTTP calls.
I don't know exactly what I a did wrong.
Trigger: