cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

AppMon 7 test automation API case sensitivity v1 vs v2

Bert_VanderHeyd
Advisor


With AppMon 7 the REST API regarding test automation has changed and there is now a v2. I was assuming that the v1 would stay backwards compatible, but that it is not the case.


Our TFS plugin (https://github.com/Dynatrace/Dynatrace-AppMon-TFS-Integration-Plugin) is failing now because the body of the register test run "/profiles/{profileid}/testruns" REST call now (AppMon 7) requires camel case. While 6.5 accepted all lower case.


Currently in the plugin...


$requestBody = @{
"versionmajor" = $splitTestRunVersion[0]
"versionminor" = $splitTestRunVersion[1]
"versionrevision" = $splitTestRunVersion[2]
"versionbuild" = $buildUniqueID
"category" = $category
"additionalmetadata" = @{
"TFS" = $env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI
"project" = $env:SYSTEM_TEAMPROJECT
}
}


Server returns a jackson-exception. TestRunDTOV1 problem: no fallback setter/field defined.


When I change it to camel case ...


$requestBody = @{
"versionMajor" = $splitTestRunVersion[0]
"versionMinor" = $splitTestRunVersion[1]
"versionRevision" = $splitTestRunVersion[2]
"versionBuild" = $buildUniqueID
"category" = $category
"additionalMetaData" = @{
"TFS" = $env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI
"project" = $env:SYSTEM_TEAMPROJECT
}
}


It works.


So, v1 does not look very backwards compatible to me.


I will fix it in the plugin, but it would be nice that backwards compatibility of the REST API's is guaranteed in the future. Makes it easier to follow on the latest AppMon releases.

BTW: A better place for this post would be the "AppMon & UEM Plugins" forum, but I can't select it. Maybe an issue on my account

4 REPLIES 4

andreas_grabner
Dynatrace Guru
Dynatrace Guru

Hi Bert. Thanks for that. I will forward this to the team.

Wiktor_Bachnik
Dynatrace Mentor
Dynatrace Mentor

Hello Bert!

Thank you for your work on the TFS plugin!

v1 API was unofficial, work-in progress version of the REST API, that's why we decided to break the compatibility (we actually had a discussion about that!). For 6.5 the documented REST endpoints for test automation were in the 'old' management path, please see: https://community.dynatrace.com/community/pages/viewpage.action?pageId=221381212 It was our mistake that the temporary version was discoverable from the web interface.

When AppMon 7.0 was released, we documented the v2 API which is now the officially supported one.

We understand the need for stabilizing the APIs and we will include breaking changes only in subsequent versions of the API.

Best regards,

Wiktor

Bert_VanderHeyd
Advisor

In that case. Thanks for the unofficially released V1 API than. The breaking change is already fixed in the plugin and I guess going from V1 to V2 is a lot less work than from the old "management" API to the new one.

Currently we are compatible with AppMon 7 again and that's the most important part.

Ingo_Hackl
Dynatrace Advisor
Dynatrace Advisor

Hi Bert. I have correct permissions. You can now also post questions into "AppMon & UEM Plugins" forum. I have moved this question to this forum.

Ingo