How to create a custom Allure step function for sensible data - testing

I am currently working on a Testing Automation team, using Python and Allure to make reports of all the test cases that we run. Sometimes we deal with sensible data (e.g: passwords) that I can't show on the reports. If I use a function with a step decorator, something like this:
Which takes an element (a text box) and enters the value in it. In the step function I display the value that I want to enter, I could easily change that but the problem resides in the actual report. No matter what I enter on the step title, the report always shows the info that was passed as arguments to the function:
Thus, the "value" argument will always be displayed and that is something that I cannot have on certain projects. Is there anyway to make a custom step function that solves my problem?. I could either use with not showing the value at all or to change it to something like '*****'.

Just a thought.
#allure.step("Entering a value in element {3}")
def setSecureBoxValue(driver, element, value, box_name):

I solved my problem with the use of Fernet cryptography library.
I created a new function for the sensible data that encrypts the strings and then, inside this new function I call the one I shared on the screenshot (with a slight modification to decrypt the data). This results in the following report:

Related

Different parameter count in FORM and PERFORM

I am trying to add a formal parameter in the FORM and PERFORM in an existing code, as I will be need it the extra parameter in a new function that I have to call. The idea is that when executing the new code it keeps showing the error: Different parameter count in FORM and PERFORM (routine: CM_SHOW_CRC, number of formal parameters: 2, number of actual parameters: 3).
The code that I have for the form part is as follows:
FORM cm_show_crc
USING
civ_matnr TYPE matnr
civ_charg TYPE charg_d
civ_werks TYPE werks_d. "The parameter that I added
And the perform code is:
PERFORM cm_show_crc
USING
pis_sdow_alv-matnr
pis_sdow_alv-charg
pis_sdow_alv-werks. "The parameter that I added
The table pis_sdow_alv is type of a structure that also includes the variable WERK(Component type WERKS_D)
Before adding the new parameter WERK the code was working fine.
May anyone know what the problem in this part of the code may be?
There was also another similar question in: Different number of parameters in FORM and PERFORM, however I am not using the syntax CHANGING in my code, as it was also not used prior.
Please do tell me if you need additional information.
Thank you all in advance!
This problem can occur when FORM and PERFORM are in different includes and you only activate one but not the other.
When you activate an include, then it is checked against the active version of all other repository objects it depends on. Not the saved version. This can lead to an annoying catch-22 situation. You can not activate A because it does not match the previous version of B, and you can not activate B because it does not match the previous version of A.
The solution to this conundrum is to activate both objects together. When you activate something in SE80 and you have multiple inactive objects, you get a window where you can select multiple objects to activate together:
In Eclipse, you get a similar list by clicking on the "activate multiple" button:

Getting the values of an /AIF/ERR variant

I did try using the RS_VARIANT_CONTENTS and RS_VARIANT_VALUES_TECH_DATA, it did show the values of the variant except the values of the name space, interface and interface version in which I also need to retrieve. I also searched the VARI* and TVARC tables but I didn't found it there.
I think it has something to do with the program name and screen number. Do you have any ideas or other way that I can retrieve all those values, whether using FM or select?
Thank you.
Some of the parameters in the transaction /AIF/ERR, the ones you are talking about, vary dynamically based on the value chosen in the Application screen field. They are handled by another AIF program, and they are not saved in the program variant, but in the table /AIF/T_ERR_VARS.
You may call the function module /AIF/ERR_VAR_LOAD to load the missing parameters.
Its usage is shown in the subroutine GET_VAR of the program /AIF/ERROR_HANDLING_TRANS (which is the program behind the transaction /AIF/ERR).

Pentaho PDI unable to use parameter in transformation

Using Pentaho PDI 8.3.0
I am unable to use a parameter in a REST call within a transformation. What I've done is:
Create a transformation and given it a parameter called PAGE_NR with default value 1
Create a job
Call the transformation with parameter PAGE_NR = 1
In the transformation, set up a GET request to a REST API.
In the URL field, setup the call like http://myurl.com/foo/bar?page=${PAGE_NR}
When I call this from either SoapUI or a browser it works but it always breaks when running the job. It does not seem to translate this parameter into the value, but instead passes it exactly like mentioned above.
I need this parameter because of calling the same URL but with different results. I don't know the amount of pages up front but take care of that logic later in said transformation.
Working on Linux btw. I have tried different variations of calling the parameter but nothing seems to work.
With the information given in the comments, I am willing to make an educated guess:
The REST Client step does not perform variable substitution on the URL if it comes from a field in the stream. What you can do is insert a Calculator step before the REST step with the operation "Variable substitution on string A" with your URL field as Field A.
This should give you the desired URL with page number.

How can I make LinqPad show me all results without the need to "click" "List<T>" hyperlink to get the query to execute?

I am having an issue getting LinqPad to exapnd and/or execute a layer of my Dump().
Specifically I am using GroupBy and projecting a new object which contains the group.Key, and group.ToList() collection.
The Query executes fine, and the data is displayed...
Where I have my group.ToList(), it shows List< T > which I then have to click on to see the results. (I can click and see the results I'm looking for, but I need them without the click)
How can I make LinqPad show me all results without the need to "click" the "List< T >" hyperlink to get the query to execute?
It's tricky to replicate your problem without any example code. Have you tried the overloads of the Dump() extension that take a Depth parameter?, e.g. Dump(int depth) or Dump(string description, int? depth).
I'm not sure what the default depth is so it might not solve your issue, but it'll make the difference between something like (for example) - some test data with .Dump(2):
and some test data with .Dump(3) (as if you'd already clicked on the IGrouping above):

Filling parameter with value from Zeconfig_var table

I have the following selection parameter:
PARAMETERS: p_ver(2) AS LISTBOX VISIBLE LENGTH 5.
I would like to populate it with the results from a ZECONFIG_VAR table.
At what point would I do this. Selection Screen Output, Start of Selection, or other. I am trying to allow users the ability to decide what version of the web service they would like to call. The config table will have different url's for the different versions.
I have looked at this Answer and the tutorial provided does not make sense to me.
I would do it at the event INITIALIZATION
However, it may be even easier to just create a search-help, and assign it to p_ver using the following:
parameters: p_ver(2) visible lenghth 5 MATCHCODE OBJECT zshelpname.
Esti is right that you probably want to fill an internal table from the DB table during INITIALIZATION.
But to the populate the listbox parameter, you need to put the call to VRM_SET_VALUES in AT SELECTION-SCREEN OUTPUT.