Jmeter-- Changing data in Grid - jmeter

I have a data grid , i have to update 1 column(MV14 refer image attached) from 6 rows (eg: if value is 0 --replace with -2 )if the count of the data in grid is above 6 and then go to next requests.If the count is less than 6 I want to pick random digit from 1 to 5 and update random no of columns from 1 to 5 .
In this case if i take 2 if controllers , there will be 2 copies of the next requests in both if controllers. What can be done to remove the duplication in Jmeter?

You can use Switch Controller instead of 2 If Controllers
You can use Test Fragment to keep your HTTP Request sampler in order to avoid copying and pasting the request itself- this way your test will be easier to maintain as in case of changes you will need to perform them in one place only.

Related

ArrayFormula with VlookupS If one is blank then use second Vlookup in Google Sheets

I'm trying to use Vlookup in a Google Sheet using an ID to match 2 separate tables. If there is no match in the first table, then I am telling the code to search for it in the second table. The lookup value, and 2 tables are all in different sheets and it doesnt work but I am able to get another test to work when they are all on the same sheet so I am not sure why that is.
For example this works
arrayformula(IFERROR(if(vlookup(A2:A,D2:E,2,FALSE)<>"",vlookup(A2:A,D2:E,2,FALSE),vlookup(A2:A,G2:H,2,FALSE))))
ID
Vlookup
ID
Vlookup value
ID
Vlookup value
1
One
1
One
1
2
Two
2
2
Two
3
Three
3
Three
3
4
Four
4
4
Four
5
This Full Formula fails
Arrayformula(IFERROR(IF(vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE)<>"",vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE),vlookup($B$2:$B,'Sheet2'!$A$1:$N,4,FALSE))))
I'm not sure how to moidfy my formula, which works in individual parts and together it matches data in Sheet1! but not on Sheet 2! based on my tests.
Testing Results
Arrayformula(IFERROR(IF(vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE) --> Vlookkup matches Sheet1! data also
Arrayformula(vlookup($B$2:$B,'Sheet2'!$A$1:$N,4,FALSE) -->matches Sheet2! data
Modify the second part of the data to "False"
Arrayformula(IFERROR(IF(vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE)<>"",vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE),"False"))))
Result: Anything that does not match in either Sheet 1 or Sheet 2 says "False". But a match in Sheet 1 works and a match in Sheet 2 shows blank.
Modifying the IF statements to make consistent did not work either
Arrayformula(IFERROR(IF(vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE)<>"",vlookup($B$2:$B,Sheet1!$A$3:$I,4,FALSE),
IF(vlookup($B$2:$B,Sheet2!$A$1:$N,4,FALSE)<>"",vlookup($B$2:$B,Sheet2!$A$1:$N,4,FALSE),""))))
How can I modify the formula so that it works in unison?
This works
=arrayformula(IFERROR(if(vlookup(A2:A,Sheet1!A1:B5,2,FALSE)<>"",vlookup(A2:A,Sheet1!A1:B5,2,FALSE),vlookup(A2:A,Sheet2!A1:B5,2,FALSE))))
Still unsure if there is another error in the formula above that didn't work as I think it should have worked

Google Sheets: Data Validation - Unique row values across multiple columns

Good day,
I have seen from here a solution to control duplicate entries into a single column. A Data validation with this custom formula works well for one column.
I would like to achieve the same effect over multiple columns ... i.e. unique row entries across multiple columns. Take for example below three columns A-C. Only when values {1,2,1} are entered for the second time will the input be rejected.
A B C
1 1 1
1 2 1
1 2 2
2 2 2
1 2 1 X Entry should be rejected.
Is there a quick way to do this using Data Validation - custom formulae?
use custom formula for data validation:
=INDEX(COUNTIF($A$1:$A&"×"&$B$1:$B&"×"&$C$1:$C, $A1&"×"&$B1&"×"&$C1)<2)

Tableau - How to include Filter values to the actions and filter the target sheet

I have the workbook attached in the below link.
I have 3 Dashboard, 1 and 2 is the source and 3 is the target. When I click on any numbers in the Dashboard 1 or 2 or even drill down the Dashboard 1 and 2 using filters the same result underlying data should come in the Dashboard 3.
I have a filter "Region" in Dashboard 1 and 2 and whenever I use this filter the target data is not getting filtered based on Region.
I don't want to make the Region filter a global one since the user may want to see different regions in dashboard 1 and 2 simultaneously.
Is there a solution for this?

How to deal with intermediate additions while paginating a list with Spring Data MongoDB?

I'm trying to create a backend in Spring Data Mongodb. I have the following code which works and I have used the built in methods by extending my repo with the MongoRepository class:
#RequestMapping(value="/nextpost", method=RequestMethod.GET)
public List getNextPosts(#RequestParam int next) {
Pageable pageable = new PageRequest(next, 5, new Sort(new Sort.Order(Direction.DESC, "id")));
page = repo.findAll(pageable);
return page.getContent();
}
The above code will return the page as per the page number inserted into the "next" variable.
My android frontend however allows for things to be added and deleted from the database and this causes problems with this pagination method. Lets take an example:
When my android frontend starts up, it loads the first 5 items by
calling "getNextPosts" with next = 0.
My android frontend also keeps track of the page it is on and
increments it when the user wants to see more items.
Now, we immediately add 5 more items.
When I swipe up to fetch the next 5 items, it calls the
"getNextPosts" method passing the the "next page" value = 1. The app
will load the
same 5 items originally displayed when the app was started as the 5 "NEW" items I have added just pushed the 5 "OLD" items down in
the database.
Therefore on the app, we see 15 items comprising of:
5 "NEW" + 5 "OLD" + 5 "OLD"
So if I gave numbers to all my items on my android ListView, I would see:
15
14
13
12
11
// the above would be the new items added
10
9
8
7
6
//the above would be the original items on page 0
10
9
8
7
6
//the above would be still be the original items but now we are on page 1
Does anyone know how one can solve this issue so that when I swipe up, the items would be:
15
14
13
12
11
// the above would be the new items added
10
9
8
7
6
5
//the above would be the original items on page 0
4
3
2
1
0
//the above would be on page 1
tl;dr
That's the nature of the beast. Pagination in Spring Data is defined as retrieving a part of the result set at the time of querying. Especially for remote communication, that kind of statelessness is usually the best tradeoff between keeping state, keeping connections open, scalability etc.
Details
The only way to avoid this would be to capture the state of the database at the time of the first access and only work on that. You can actually build this by retrieving all items and page through the data locally.
Of course hardly anyone does this as it easily gets out of hand for larger data volumes. Also, this would bring up other problems like: when do you actually want to see the items introduced in the meantime? So the definition of "correct content" when paginating a list is not distinct.
Mitigation strategies
If applicable to your scenario you could try to apply a sorting that guarantees new items to be added at the very end and thus basically making this an append-only list. This would naturally sort the most recent items last though, which is contrary to what's needed often times.
If you use the pagination to work down a list of items and process all of them, another approach is to keep track of the identifiers of the items you already have processed. In your particular scenario, you'd be able to detect that the items have already been processed and go on with the next page. This of course only makes sense if you read and process faster than someone else manipulates the list in the backend.
Another solution could be to store an insert timestamp into the db for each entry. This enables you to create deterministic pagination queries:
The moment you initialize pagination (querying first page) you restrict items to have an insert timestamp lower equals than now(). You have to save now() as the pagination timestamp for querying more pages in the future. Since newly added items all get an insert timestamp greater than the pagination timestamp those items won't affect existing paginations.
Please keep in mind that new items won't show until you re-initialize pagination by refreshing the pagination timestmap. But you can simply check for the existence of new items by counting the number of items with an insertion timestamp greater than the pagination timestamp and in this case show a refresh button or something like that.

Exactly how do Visual Studio 2010 Data Sources behave when Access Method is "Random"?

In Visual Studio 2010, if you bind a Data Source to a Web Performance Test you have the option of setting the Access Methods to "Random", defined as follows:
Move randomly through the rows in a table. This access method will
loop through data in a table throughout the duration of a test.
We've been parsing this definition, but are not sure exactly what happens. Does it mean:
Each time the source is accessed a row is chosen at random (i.e. you might get the same row in two tests in a row by chance); OR
The source is first shuffled into a random order, and then the data source will "loop through" the shuffled data (i.e. every row is used once before any row is seen a second time); OR
Something else?
Note we only have one agent, so repetition from that source is not a concern.
Thanks in advance.
Testing confirms that indeed the row is chosen entirely at random.
With a simple data source:
value
0
1
2
3
the order of values chosen in a test I just ran was:
3
3
3
1
1
2
3
...etc
For an actual "shuffle" implementation you'd need to write your own WebTestPlugin or WebTestRequestPlugin.

Resources