Azure pipeline priority

Azure has a Test runs report.

The 3th column is called ‘PRIORITY’

How can I set a priority somewhere in the .robot file so that Azure picks it up in that column?
What exactly is needed for that?

Robot Framework doesn’t really have a concept of priority for a test case, so I’m not sure what you would put into that field unless you passed something through to robot framework from another system.

As an example, if you are launching robot framework from a CI/CD process you could pass a priority value in as metadata or a variable, then you’d need to map that value to the Azure report (I’ve never used Azure test reports, so I don’t know about that)

Hope that helps,

Dave.

Launching from a CI/CD process is exactly what we do. Oké I will try to find out how it works and will post it here.

robotframework has to support TRX or Xunit

can I set the priority in robotframework to azure to pick it up.

XUnit compatible result file, that’s the easy bit just use the -x switch when you launch robot.

Now for the priority field I can think of 2 possibilities:

I’m not sure which will give the desired result, maybe someone familiar with this can shed some light on how to add the priority value to the result? Or you can just try things and see what happens, i’m guessing it’s the tag might be the one you need, so try that first I guess.

Dave.

1 Like

xunit and junit use different format.

Sorry, I don’t understand this comment in the context of this thread?

yeah sorry Damies, forget about the xunit and junit use different format comment, first I have to investigate and try more regarding your previous comments.

*** Settings ***
Metadata   Priority   1

So that would make it work?

1hr later and tested, conclusion: NO, adding this (format) in the .robot file doesn’t make it work.

Tried a lot, can’t get it to work properly. :disappointed:

Hi @valentijnpeters,

I did a little research on this, I have some good news and some bad news…

I found this: https://github.com/robotframework/robotframework/pull/4193

  • The good news is I was on the right track, with setting the metadata.
  • The bad news is the code to implement this was only checked in about 18 days ago, so hasn’t made it into a release yet

At least you now know why you couldn’t get it to work, I guess add the meta data to your tests knowing it won’t work now but should eventually.

Dave.

It is a mapped field, so it should be possible:
Publish Test Results task - Azure Pipelines | Microsoft Docs
/testcaseNode/traits/trait[@name='priority'].Attributes["value"].Value

Robin, thusfar it looked liked:
(with the research we did)

As long as you don’t use the section “TESTPLAN” in Azure, then It won’t work…

Also:
My colleague was somewhat right: I’d rather have good solid tests that fail when they are supposed to fail. then the notion (this is a prio 1 test vs this is a prio 2 test).
However…

achieving in giving the proper Metadata in a .robot file resulting in the Azure reporting showing content in the Priority column somehow also would look more professional, is my humble opinion.

I tried a lot, maar tot nu toe… no luck.

It would be nice, but then Microsoft needs to add support for it to the other formats than their own TRX format.