JMeter - Need to submit POST data but I only wish to modify a single field - jmeter

I'm running some JMeter tests for editing a field. If I use the JMeter HTTP(S) Test Script Recorder, I can get an accurate representation of the page and edits I made.
It creates a HTTP POST request with a parameter for every field, checkbox and dropdown on the page. I only really care about modifying ONE of them.
My problem is I can't just remove all the other parameters from the POST data because the page interprets this as if I removed all of them from the page (and then complains that there's missing data). So I'm left with trying to obtain the current values for the remaining editable fields and checkboxes so that I can re-submit them when I only want to modify a single field.
For an example, imagine I'm submitting some user data with fields for Name, Email and Address. I want to change the name by adding a 1 to the end of it and leave the other two fields as they are.
My thoughts for accomplishing this:
1) Use XPath to try to get the values shown on the page, store them all in variables and re-submit them in the post request. This is messy and also very difficult as the page is shown in a pop-up window, adding to the complexity of it.
2) Query the database for all the information and re-submit it. Seems like a lot of overhead, plus the data isn't freely available .. I'd rather not have to try to do this.
3) Use some other element of JMeter I'm not aware of to obtain the specific element data from the page. Maybe some listener I haven't figured out yet? If I could pull the parameters from the page and save them, that would be VERY convenient.
4) Somehow submit a POST request with only one field, specifying that I do not wish to clear out the remaining fields, I just want to leave them alone. I will freely admit that I am not super familiar with web applications so there may be a very obvious reason as to why this can't be done (or it's dependent on how its handled by the back-end of the application).
Thoughts?

From the whole post, I understand that you want to parameterise a field, where each time different value will be passed.
If my understanding is correct, the answer lies in CSV Dataset Config, where you can pass the values from a CSV file.
From your Example:
For an example, imagine I'm submitting some user data with fields for
Name, Email and Address. I want to change the name by adding a 1 to
the end of it and leave the other two fields as they are
To achieve this:
Steps to follows:
Create a csv file. fill the names as follows:
names
name1
name2
name3
name4
names is the column header and remaining are values.
Add CSV Dataset Config to your Test Plan.
Specify the file path.
replace the value in the name field in HTTP Post request as ${names}. that's it.

Related

Apache Nifi, can I collect an attribute from multiple flow files

I have a nifi flow that takes in .csv files and partitions each into multiple records with each csv column value added as an attribute.
At one point in the flow, I'd like to collect the value of one attribute from each record that passes though. There could be from 0 to n collected. Once I have the list, it'll be emailed out.
I'm trying to avoid me (or someone else) getting bombed with emails if there are 200+ bad records in a file. So if I could collect for a fixed period of time or until another attribute (filename) changes, that would be great.
I've tried merge content and record. I even tried replace text to replace the content w/ just the attribute value I want to save and merging those, and a slew of other things.
Is there a simple way to do this in nifi?
Have you tried UpdateAttribute with a new attribute of type array. When each flowfile passes the this processor you could continue to update the value of this attribute by appending a new value to the array, attribute.
However, as #daggett pointed out, it will be helpful if you can provide the input and expected output.

SSRS Report Parameters Interactive

I have a report that requires 3 parameters, all 3 has q query to pre populate them using a dataset for each, so the under their properties the available values is selected with the query. Default were also set to use the same query. This work fine.
My problem is when the user of the report wanted to enter the values themselves rather than going into the list populated by the query. Users know the value that they wanted to enter so it's faster for them to enter rather than select. SSRS report seems not to give you the ability to enter if you have set the available values and default values for some reason. Is their a way to go around this please?
Many thanks.
There is one straight forward way to use comma separated multi value parameter rather than list where user enters input.
Below link explains in detail, but I am quite sure you do not want to stick to below solution.
https://www.mssqltips.com/sqlservertip/3479/how-to-use-a-multi-valued-comma-delimited-input-parameter-for-an-ssrs-report/
Another thing you could do is keep your multi value parameter as list as it is and create a text input parameter.
Now if user want to simply choose from list fair enough you will have to handle second parameter as null because user chose from list.
Then on your dataset check and apply filter as 2nd parameter value as not null.
Same goes if user does text input then multi value parameter as not null.

How to read an excel sheet and put the cell value within different text fields through UiPath?

How to read an excel sheet and put the cell value within different text fields through UiPath?
I have a excel sheet as follows:
I have read the excel contents and to iterate over the contents later I have stored the contents in a Output Data Table as follows:
Read Range - Output:
DataTable: CVdatatable
Output Data Table
DataTable: CVdatatable
Text: opCVdatatable
Screenshot:
Finally, I want to read the text opCVdatatable in a iteration and write them into text fields. So in the desired Input fileds I mentioned opCVdatatable or opCVdatatable+ "[k(enter)]" as required.
Screenshot:
But UiPath seems to start from the begining of the Output Data Table whenever I called for opCVdatatable.
Inshort, each desired Input fileds are iteratively getting filled up by all the data with the data stored in the Output Data Table.
Can someone help me out please?
My first recommendation is to use Workbook: Read range activity to read data from Excel because it is quicker, works in the background, and does not require excel to be installed on the system.
Start your sequence like this (note the add headers property is not checked):
You do not need to use Output Data Table because this activity outputs a string containing all row items. What you want to do instead is to access the items in the data table and output each one as a string in your type into, e.g., CVDatatable.Rows(0).Item(0).ToString, like so:
You mention you want to read the text opCVdatatable in an iteration and write them into text fields. This is a little bit more complex, but i'll give you an example. You can use a For Each Row activity and loop through each row in CVDatatable, setting the index property if required. See below:
The challenge is to get the selector correct here and make it dynamic, so that it targets a different text field per iteration. The selector for the type into activity will depend on the system you are targeting, but here is an example:
And the selector for this:
Also, here is a working XAML file for you to test.
Hope this helps.
Chris
Here's a different, more general approach. Instead of including the target in the process itself, the Excel would be modified to include parts of a selector:
Note that column B now contains an identifier, and this ID depends on the application you will be working with. For example, here's my sample app looks like. As you can see, the first text box has an id of 585, the second one is 586, and so on (note that you can work with any kind of identifier including the control's name if exposed to UiPath):
Now, instead of adding multiple Type Into elements to your workflow, you would add just a single one, loop over each of the datatable's row, and then create a dynamic selector:
In my case the selector for the Type Into activity looks as follows:
"<wnd cls='#32770' title='General' /><wnd ctrlid='" + row(1).ToString() + "' />"
This will allow you to maintain the process from the Excel sheet alone - if there's a new field that needs to be mapped, just add it to your sheet. No changes to the Workflow are required.

Identify if objects are the same

I want to check certain objects against each other and identify if they are the same.
For example, I need to verify that the total cost in one page is the same as another page. I developed a script that works, however the total cost changes every day so I have to update the object properties in maintenance mode every day.
Is there a way that UFT automatically recognizes this object must change and update?
I request you to elaborate your question. For now, you can use .* if certain values of the object are changing. Alternatively, you can store the values in an excel sheet and you can change everyday depending on the requirement.
If this is not helpful let me know
It sounds like you actually want to compare the values shown in two different objects, and see if those values are the same. (I assume this because you say they are on two different pages)
Also, you mention maintenance mode, so I assume you are using checkpoints to store their expected values.
I would suggest: instead of storing the expected values in a checkpoint, you could read the value of the first object (getROproperty), store it in a variable (dataTable field, environment variable, etc), and then navigate to the other page, read the ROproperty from the other object, and then compare.
i.e.
if {browser,page,object...}.getROproperty({whateverPropertyYouNeed}) = environment({storedFirstValue}) then
reporter.reportevent micPass,"compare step","{details here}"
end if
*replace stuff inside {} with your code, I don't know what it is
If you need to actually store the total cost externally, you could use a DataTable field and export the sheets at the end. then import the same sheet at the beginning. That would save the data to an excel sheet on a drive.

How can I update all records in 1 request using parse.com?

I would like to set a particular column to some value for all users, how do I achieve that?
Example, set the 'changed' column to 'true' for all users. Any cheap way to do it?
If your goal is to do it cheaply, I don't think that you can change a huge amount of data without incurring a lot of api calls.
Perhaps, export your data as a JSON file
(they will email you the JSON)
Write a short script to parse the JSON and change the value you want
Import Your document back

Resources