Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Method 'GET' not allowed. #128

Open
fenixjke opened this issue Jun 21, 2016 · 9 comments
Open

HTTP Method 'GET' not allowed. #128

fenixjke opened this issue Jun 21, 2016 · 9 comments
Labels

Comments

@fenixjke
Copy link

fenixjke commented Jun 21, 2016

Hi,
I got an error when I tried to run sync test for salesforce (command + shift + U):
errorCode: METHOD_NOT_ALLOWED
Time Stamp: 2016-06-21 17:36:30
message: HTTP Method 'GET' not allowed. Allowed are POST

@xjsender
Copy link
Owner

@fenixjke , how to replicate it?

@superdave7380
Copy link

Hey, I also get the error whenever I run to run a sync test.
When on test class, right-click > Haoide > Run Sync Test
Happens every time.

Thanks!

@xjsender xjsender added the bug label Aug 10, 2016
@xjsender
Copy link
Owner

@superdave7380 , yes, I also replicate this issue caused by new feature of v37.0, you can decrease the api version to avoid this problem.

@superdave7380
Copy link

As always, thanks very much for the speedy reply.

@aitiancai
Copy link

change api_version to 35 in Setting-user。

@scolladon
Copy link

@xjsender I would like to reopen this issue because there are multiple changes after metadata API 37 (in picklist per exemple) and I do not want to switch api version each time I test a class. Furthermore, this change in the API is not going to be reverted with new releases. It will be much more easier for the end user if the feature adapt its http method with the selected api version

@rspurrell
Copy link
Contributor

I would like this issue addressed as well for all of the same reasons that @scolladon mentioned.

@adashko
Copy link

adashko commented Oct 25, 2018

I would like this issue addressed as well for all of the same reasons that @scolladon mentioned.

Sync test working (after your fix), but 'View Code Coverage' - not. 'No code coverage cache, please execute Run Sync Test on related test class before view code coverage'

@rspurrell
Copy link
Contributor

I would like this issue addressed as well for all of the same reasons that @scolladon mentioned.

Sync test working (after your fix), but 'View Code Coverage' - not. 'No code coverage cache, please execute Run Sync Test on related test class before view code coverage'

Since I pushed this fix it seems that the lines not covered are no longer being returned in the code coverage as part of the RunTestsSynchronous response. The locationsNotCovered array now contains empty entries. This is possibly a SF bug, but it may be intentional in favor of another method. Either way, the response no longer returns what HaoIDE is expecting.

After inspecting with Fiddler, I can see that this is happening in the Developer Console (DC) too. However, when viewing code coverage in the DC, a separate query for coverage is made which does return the lines covered and uncovered. Unfortunately, the response from that call is very different from what is currently handled.

If this isn't a SF bug, two updates will need to be made. One in the processor.handle_run_sync_test function to retrieve the coverage using a query, as in the DC. The other would be in the util.view_coverage function to correctly read the new JSON structure of said query.

I'll submit a SF bug report tomorrow and see what they say. However, I don't expect a speedy response. Likely they'll instruct me to use the code coverage query method.

I'll keep you posted.

lushang added a commit that referenced this issue Feb 24, 2019
Fixed bug #128: HTTP method 'GET' not allowed on Run Sync Test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants