[pytest + allure]: customize (add custom labels) to test's history - pytest

using pytest + allure
allure-pytest 2.9.45
allure-python-commons 2.9.45
Is there any ability to customize test's history in the report?
Instead of time or nearby add more info f.e. some custom labels / fields

Related

Project Level DrawnBy Parameter in Altium

I have a Schematic template that refers to the DrawnBy parameter and others to fill in the title block. This works fine if I edit each sheet's document parameters to display the correct information. However, I want to use the project parameters to fill in the relevant information.
The schematic documents have default parameters such as, DrawnBy, Revision, etc, that override the project parameters so each sheet needs to be manually edited for author, dates, and revisions.
How do you override the default document parameters with project parameters?
This would be a better fit for the electronics.stackexchange.com site.
On the schematic document or template (sheet), each field is represented by using the custom text =ParameterName. Once you have the document open in the context of a project, you can add project-level parameters via the menu Project > Project Options, Parameters tab. Add the parameter using the same name that was used on the document. All documents sharing the parameter name will inherit the value entered here.
Don't add any parameter to this list that should be unique to each sheet.
For more information:
Altium Designer: Project Options - Parameters
Electronics StackExchange: Project parameters as variable in Altium

Tableau: Dashboard Parameter

I change my start date and end date parameter to a relevant date range, and I was able to switch the filters in the worksheet. How do I change the parameter in the dashboard? I was able to remove the start and end date parameter from the dashboard, but unable to add the new relevant date parameter in the dashboard.
You should be able to use Analysis -> Parameters option in the Main menu. This should show all the Parameters present in the worksheet on your dashboard. If it is not visible then make sure that you have the correct worksheet on your dashboard and the Parameter is enabled for filtering in the sheet present on your dashboard. Hope this helps.
There are 2 ways to add Parameter to your Dashboard
1) Select Analysis (on bar menu) -> Parameters ->
2) Right-click on any of the Sheet shown in your Dashboard -> Parameters ->

How to add a new Activity type to the Task work item in VSTS

Is it possible to add a new Activity type on the Task work item in VSTS and, if so, how can I do it? Thanks!
To add activities that is also available in the Work Details page and Sprint capacity view you need to go to the Process used by the Project (Make sure you have a Process that is editable for the project) and edit a work item type that use the activity field.
You can then edit the work item field and add values to the pick list
Edit work item activity picklist
For VSTS, you can not change system fields (such as Activity) in System processes (Agile, Scrum and CMMI).
The workaround is create an inherited prcess and a new field to replace the system Activity field.
Such as if you are using Agile system process, you can create an inherited process (myagile) from Agile, then change your team project to the inherited process. And add a new field (such as Activity1) to replace the system Activity field. Detail steps as below:
Create inherited process
In Process Tab (https://account.visualstudio.com/_admin/_process) -> Create inherited process from system process -> input the name (such as myagile) -> Create.
Change your team project to use inherited process
Click … button for the inherited process myagile -> Change team projects to use myagile -> select your team project which you want to use the inherited process -> OK.
Add a new field for Task WIT
Click the inherited process (myagile) -> Task -> New field ->cCreate the field Activity1 with picklist(string) type -> add values as system Activity field has (Deployment, Design, Development, Documentation, Requirements and Testing) -> add the new value you want to add (such as MyActivity) -> Layout Tab -> Change the Label as Activity -> Add field.
Replace custom field Activity1 to replace system Activity field
Click … button for the system Activity field -> Hide from layout -> move the custom Activity1 field to the same position of the system Activity field.
Now you can select the new added value from Activity (Activity1 field) dropdown list.

Print application version for each report using JasperReports

We are using JasperReports 6.0.0 and have about 30 templates for different reports that have almost nothing in common. Today we have got a requirement to print application version at the bottom of each page for every report.
I could not find any good solution to do it without modifying every template file. Does JasperReport allows to specify general layout for all templates? Is there any solution to add label to each page without modifying existent templates?
Some approaches:
Modify all .jrxml files and add a footer to each one, manually.
Use XSLT to modify all the .jrxml templates and add a footer.
Use iText to modify the report output after generating the report PDF.
Use the JasperReports API to programmatically inject a footer band into the in-memory template prior to compilation and execution.
Use the JasperReports API to programmatically inject a footer band into each .jrxml file and save the file back to disk.
Create a master template and include a parameterized subreport.
The last approach would have a master template as follows:
-----------
| Title |
-----------
| Subreport |
-----------
| Footer |
-----------
Then, when running the report, pass in a parameter that indicates what subreport to include (i.e., one of thirty). In this fashion, the Title Band and Footer Band are shared by all thirty reports. It's more work, but ultimately the most flexible solution.
If the Title Band differs completely across all reports, parameterize it to use a subreport.
Here's a screenshot of a master report that includes a subreport, which is given as a parameter. In the screenshot, the Title Band doesn't include a subreport because each of the several reports looks identical (the human-readable report title is also a parameter). It should be easy to see that if the Title Band had to change its layout for each report, then using a subreport instead would facilitate such a solution:
The footer, though, as shown in the screenshot, is one possible answer to your question.
You may need to define a variable that allows for calculating the page numbers:
<variable name="V_CURRENT_PAGE_NUMBER" class="java.lang.Integer" resetType="Page">
<variableExpression><![CDATA[1]]></variableExpression>
<initialValueExpression><![CDATA[$V{PAGE_NUMBER}+1]]></initialValueExpression>
</variable>
And a corresponding text field that references the page number:
msg("Page {0} of {1}", $V{V_CURRENT_PAGE_NUMBER}, $V{PAGE_NUMBER})
Keeping in mind that JasperReports uses absolute paths, define a few parameters to avoid hard-coding the location of the subreports. For example:
$P{P_REPORT_SUBREPORTS_PATH} + $P{P_SUBREPORT_NAME} + ".jasper"
Here, P_REPORT_SUBREPORTS_PATH is defined in terms of a P_REPORT_BASE variable:
$P{P_REPORT_BASE} + "subreports/"
This allows the report IDE to use a different directory than that of the web server by providing a different value for P_REPORT_BASE, depending on context.
Finally, keep in mind that what might be seemingly different reports could be a parameterized report. JasperReports allows for custom styles, which makes possible to dynamically change the report appearance (e.g., text justification, fonts, emphasis, borders, and so forth). In the screenshot, the report title, for example, is changed with each of the several reports--but they all share the same Title Band because the report title is passed in as a String parameter.

How to make dynamic drop down lists on parameterized build page in a custom Hudson plugin?

I am trying to achieve the following for a parameterized hudson job: when a user clicks on 'build now' he should be presented with three drop down list parameters viz., Environment, Server, Port. I want the drop down to be dynamic i.e on changing the value of environment the list of servers should change accordingly and similarly the values of port should change on the basis of selected server.
Once a user makes the final selection, all three values from the dropdowns are to be used to make a single value to be passed to the build job as a parameter. I am stuck at how to achieve this in a single parameter and make it dynamic. In my custom plugin i have extended the ParameterDefinition class and within it i have a static nested class extending the ParameterDescriptor class with doFillXXXItems() for these three fields. The values in environment dropdown are populated on the basis of logged in username. I would really appreciate it if somebody could help me figure out how to make the drop downs dynamic. I have already tried the dynamic drop down listbox in ui-samples plugin but its not working in my case :(
You could inherit hudson.model.ChoiceParameterDefinition, and override its method of getChoicesText. return the options based on whatever you want, in your situation, you could get environments from Hudson.getInstance().
Below snippets is shown how get environment variable.
Hudson.getInstance().getGlobalNodeProperties()
.get(EnvironmentVariablesNodeProperty.class).getEnvVars().get(name);