All Questions
Tagged with httpresponse httpcalloutmock
6 questions
0
votes
1
answer
130
views
Problem with testing void HttpRequest
I can only get 23% code coverage with what I have. The http request in the method is not getting covered for some reason..
Here's what I've tried:
Class:
public class PostClientes {
@...
0
votes
1
answer
338
views
facing System.CalloutException for HTTP response in test class
I'm facing
"System.CalloutException: You have uncommitted work pending. Please
commit or rollback before calling out"
Here is my codes:
(Adding only the relevant code)
Callout Class which ...
2
votes
3
answers
2k
views
Sending attachment to JIRA From Salesforce Issue
I am trying to upload to JIRA from SF. I am using below code.
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();
Blob headerValue = Blob....
7
votes
1
answer
4k
views
You have uncommitted work pending. Please commit or rollback before calling out
I have written a callout class as below.But when a account is created/updated am getting the exception like "You have uncommitted work pending. Please commit or rollback before calling out" at 36 line(...
6
votes
1
answer
5k
views
how to get test coverage for @future and http response method in class
Below is my apex class and trigger, that is used to send sms from 3rd party application and that is working fine, but i'm not getting test coverage for class.
If i use @future method my apex class ...
2
votes
0
answers
643
views
http mock for dom document
I am using http mock method for testing responses.
But as one of the class expects DOM document and use response.getBodyDocument().
Usually, I used to insert sample response for http mock. I am ...