• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Thomas F. · Jul 02, 2015 at 09:40 PM · continuous delivery

dT 6.2 Testrun creation via REST not working

Hi,

using dT 6.2.0.1238 the creation of testruns via REST doesn't seem to work:

I get a valid response back but the testrun can't be found via GET and the testautomation dashlets don't show anything when sending the appropriate header with the tests.

I tried creating testruns via SoapUI, via Postman and eventually via http://<dtServer>:8020/api-docs/index.html#!/management/createTestRun using XML and JSON.The result is always the same. 

Sample POST:

POST http://<dtServer>:8020/rest/management/profiles/CI/testruns HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
accept: application/json
Content-Length: 125
Host: <dtServer>:8020
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Authorization: Basic YWRtaW46YWRtaW4=

{
    "category": "webapi",
    "platform": "linux_x64",
    "versionBuild": "3.2.8",
    "versionRevision": "802518"     
}

Response
{"testRun": {
                
   "category": "webapi",
   "href": "http://<dtServer>:8020/rest/management/profiles/CI/testruns/381c9959-98c6-4897-8eaf-558cf6263c57",
   "id": "381c9959-98c6-4897-8eaf-558cf6263c57",
   "numDegraded": 0,
   "numFailed": 0,
   "numImproved": 0,
   "numInvalidated": 0,
   "numPassed": 0,
   "numVolatile": 0,
   "platform": "linux_x64",
   "systemProfile": "CI",
   "versionBuild": "3.2.8",
   "versionRevision": "802518"
}}

Notice the missing creationTime key in the response as described here https://community.dynatrace.com/community/display/DOCDT62/REST+Interfaces+for+Test+Automation

A GET to http://<dtServer>:8020/rest/management/profiles/CI/testruns.json/ returns no testruns:

{"message":"No test metadata was set or no testrun occurred between 1970-01-01T01:00:00 (timestamp: 0) and 2015-07-02T17:26:04 (timestamp: 1435850764109) with additional parameters: null","testRuns":[]}

Any help would be appreciated.

Thanks
Thomas

 

 

 

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

12 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Thomas F. · Jul 03, 2015 at 07:47 PM

The issue was resolved by connecting to an performance warehouse (Oracle DB) - I assumed the Server used the embedded warehouse but this was not the case.

IMHO the POST should fail if no perf warehouse is connected.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Thomas F. · Jul 03, 2015 at 04:21 PM

Ok, thanks.

I have created SUPDT-10676 already some hours ago.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Florent D. · Jul 03, 2015 at 04:16 PM

it is defaulting to 30 minutes because you have already a dashboard with those settings and they are inherited. It would default to 30 days if you where to open the test results dashlet in its own dashboard.

I'm sorry but I can't replicate your issue here. I even created the same dashboard as you have and it is fine for me.It really looks as if the license isn't working properly and blocks the feature.

I think you might want to raise a support ticket for this.

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Florent D. · Jul 03, 2015 at 03:48 PM

some dashlets can freeze and not show the right data after a while. Could you try to close it down and re-open it in a new dashboard? Change the time window to 1 hour as it defaults to 30 days.

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Thomas F. · Jul 03, 2015 at 03:54 PM 0
Share

Tried all of that before, no difference. Also restarted client.
Also the default is 30 minutes for me for some reason.

avatar image

Answer by Thomas F. · Jul 03, 2015 at 03:44 PM

Just realized I even get this when I provide NA+TR (not when I provide TN) in servlet details:

Still nothing in Test Automation Dashlet.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Florent D. · Jul 03, 2015 at 03:39 PM

first let me answer your previous post. The x-Dynatrace header you see in the response is used for internal purposes and you can ignore it. If you are really curious it is what we use to link the various application tiers together so it has nothing to do with the execution of tests.

So it now looks like you are seeing purepaths and that they are tagged properly but you cannot see anything in the test automation dashlet. This feature should only be available with the test centre edition so which license are you using right now?

 

Comment

People who like this

0 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Thomas F. · Jul 03, 2015 at 03:46 PM 0
Share

I am using a Test Center Edition.

 

avatar image Kristof R. · Jul 06, 2015 at 12:00 PM 0
Share

Hi Flo,

Not entirely relevant to this problem, however: the X-Dynatrace header is not only for internal purposes.

It allows us to tag web requests with test names, virtual users, geographical regions etc.

Integrations with LoadRunner and jMeter for example use this (on top of the above mentioned integration using a test-run id) in the "Tagged Web Requests" dashlet.

More information: https://community.dynatrace.com/community/display/DOCDT62/Integration+with+Web+Load+Testing+and+Monitoring+Tools.

KR,
Kristo 

avatar image

Answer by Thomas F. · Jul 03, 2015 at 03:32 PM

I just used a System Profile I created from scratch to make sure no sensor setting can be the culprit. Still same behavior.
Could it have anything to do with my license? In a Development Edition I saw there was some option for CI in the system profile settings. I do not see this with my Test Center license.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Thomas F. · Jul 03, 2015 at 03:19 PM

Still not working (sad)

I see there is a different behavior when I provide NA+TR in the header or TN (+TR/RC, doesn't matter).
This header "X-dynaTrace: NA=TestEnrollMember ;TR=a05b88b0-0270-4dd1-873c-59925141adea" gives me at least a tagged request in dynaTrace and I get dynatrace headers back in the response:

X-dynaTrace: PT=549;PA=1983121591;SP=CI;PS=-2113336576
dynaTrace: PT=549;PA=1983121591;SP=CI;PS=-2113336576

When providing this header: "X-dynaTrace: TN=TestEnrollMember;TR=83f037d6-c74c-4e03-b74b-55b4e1cf0b29"

I don't get any dynaTrace header in the response at all. Same behavior when I just send this header: "X-dynaTrace: TN=TestEnrollMember"

In all cases I get the correct PurePaths. In the Servlet Details TN=TestEnrollMember shows up under "HTTP Tag: " In Web Request Details and not under Request Headers, same with the NA+TR headers. So the header is being sent correctly in all cases.

Nothing shows up in Test Results / Test Overview dashlets.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Florent D. · Jul 03, 2015 at 03:02 PM

Hi

yes, that's what I was going to suggest. You must run tests to see something. The way the system works is by tagging purepaths/requests but if there aren't any then you won't see anything on the dashlet.

I ran a quick test without soapui and it worked fine. I called the POST testruns directly with chrome, extracted manually the id. I then ran fiddler in breakpoint mode and I called my web service. Fiddler held the request. I then added a X-Dynatrace header with the testrunid and pressed play. I could see the test fine in the dashlet. See screenshot. The first test was executed via soapUI and the second manually via the browser.

I hope this helps.

 

Flo

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Thomas F. · Jul 03, 2015 at 02:56 PM

In REST Interfaces for Test Automation I just found this:

A test run is listed if at least one test (method) is executed in the specified timeframe

So my approach to find the issue doesn't work. Will check again to send tests with Soap UI with the X-dynaTrace header containing TR.

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Wiktor B. · Jul 03, 2015 at 03:14 PM 0
Share

That's correct, currently /testruns endpoint responds to GET request with a list of test runs that had at least a single test execution. It may not be too intuitive (taking REST guidelines into the account), so we'll be working to change that (probably in the next release). The plan is to make /testruns respond with all registered test runs and allow easy filtering if client wants to receive only those that had test executions.

Best regards,
Wiktor Bachnik

  • 1
  • 2
  • ›

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Options for REST reporting

Test automation initial setup.

How to build communication with REST interface using LoadRunner

Loadrunner script tagging for scripts in URL mode

Treating Multiple Requests as a Single Transaction with LR

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A