oracle apex with jmeter - jmeter

i start to do a loading test with jmeter, i have a form where i can insert record, in the url of insert action there is a parameter called p_json, i do a very basic with table containing one column. the p_json is like this
{
"pageItems":{
"itemsToSubmit":[
{
"n":"P13_ROWID",
"v":"",
"ck":"9P9SjzLAQLGkBy_q7phVqLeAJFI"
},
{
"n":"P13_TEST",
"v":"fgjgghjhgjghjghjghjghjghjghj"
}
],
"protected":"QnL4629OYon2MxvQzUtEag",
"rowVersion":"",
"formRegionChecksums":{
}
},
"salt":"188736967333118203740478635219988206060"
}
how can i generate ck value in the json, the protected value... in my jmeter request
any documentation of how to do load testing with apex? is there an oracle tool to do this?

According to this answer
When Value Protected of an hidden item is set to YES a checksum is generated when your page is loaded. When you submit the page with a different value the checksum is not valid anymore and you get the error.
So my expectation is that it is the matter of simple correlation, to wit you need to extract the value from the previous response using a suitable JMeter Post-Processor, store it into a JMeter Variable and replace this QnL4629OYon2MxvQzUtEag value with the variable.

Related

How to parse a json with dynamic property name in OIC?

I need to consume and parse incoming json from a third party system in my code. I used RestTemplate to do it. So the response from the system looks like below.
{ "data": { "05AAAFW9419M11Q": { "gstin": "05AAAFW9419M11Q", "error_cd": "SWEB_9035", "message": "Invalid GSTIN / UID" } } }
Now the problem is the property name ("05AAAFW9419M11Q" in this case) in dynamic and in the next response it would be another string. In this case, how can I parse this json as this is not fixed in Oracle Integration Cloud? Response wrapper is not capturing the data apart from the one that is used for configuring the adapter which is fair enough as fieldname itself is changing.
Is there is any workaround for this?
You will have to go to PL/SQL and dynamic SQL, and if it's always the value of gstin entry, you can get the path of the key with
select '$.data.' ||
json_query(js_column, '$.data.*.gstin') into v_key path from table_with_json_column where ... conditions... ;
(assuming there is only 1 "data" per JSON payload) to later build a dynamic query based on json_table.

ag-grid number filter is not working when the field value is rounded

The requirement as follows; The data from backend is stored in row data and passed to ag-grid. The numeric fields in the row data needs to be rounded to 2 digits or more based on the business need. I need to provide numeric filter that needs to filter based on rounded values.
I have attached a sample code in plunker https://plnkr.co/edit/zlNhlPmmFC2GfLfS.
{ field: 'exp',
filter: "agNumberColumnFilter",
cellRenderer: params => {
if (params.value) {
return Number(parseFloat(params.value).toFixed(2)).toLocaleString("en");
}},
filterValueGetter: params => {
if (params.data.exp) {
return Number(parseFloat(params.data.exp).toFixed(2)).toLocaleString("en");
}}
},
For example, the experience column is received as 3.765. It needs to be displayed as 3.77. I have used cellRenderer to achieve the same. It is working fine. The next step is filter needs to work when the user type in 3.77. But it is working when the user is typing the original value 3.765. So I am trying to achieve this using filterValueGetter and round the values. It is not working. I have tried options with valuegetter and filter api and it is not working. Appreciate a solution without modifying the actual json and format it in the grid using the available API

sending multiple selected values comma-separated to a stored procedure

I am currently using this:
params["RPBla"].join(",")
as default parameter of a (stored procedure) dataset. This works fine and sends one or more selected values from the report parameter RPBla to a stored procedure, e.g.:
1,2,3
Unfortunately, this does not work if the user does not select any value. Any ideas what to do. Actuate BIRT should send NULL instead of for example 1,2,3.
What about testing the content in this default value expression, something like:
if (params["RPBla"].value==null){
null;
}else{
var list=params["RPBla"].join(",");
list.length>0 ? list : null;
}
Of course you could return anything you need instead of "null" here, for example returning a specific value warning the stored procedure that the filter should be disabled.

ALERT SESSION VALUE FROM first page to 2nd page using JQuery,ajax, or javascript

hi guyz this is my first time here. ahmmm i'd like to ask some question regarding session. ahmm
how i cant alert session value from first page to 2nd page using jquery,ajax, or javascript??
please help, im new on that language. ):
You can pass value from one page to other using url query string.
one link to second page add data as parameter like http://your-url.com?data=user-session-value
in the second page call the below javascript function in onload or where you need value
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
you can alert the value like alert(getParameterByName('data'));
In this way your data will show in url. if you don't want to show it then use localstorage. But you need to be in same domain. I mean u can't pass data from one website to other.
In page one just set the data in local storage like localStorage.setItem('data', 'user-session-value');To alert the data in second page call alert(localStorage.getItem('data'));
Hope this can solve your issue... Happy coding...

Grails chained drop down

I'm trying to implement chained drop down boxes using the tutorial here. My classes are not as straight forward as the ones in the tutorial though.
I want to chain the drop down boxes for the create.gsp view in the Load class. Each load belongs to an account from the Account class, and each account belongs to a user from the User class, and each user has several cargo destinations from the Address class.
My goal is to have the cargo destination field up date based on which account is selected.
I am having trouble understanding the AJAX function in the tutorial (step 3), and how it relates to the Grails function (step 4).
Here is the AJAX code:
function respondToSelect(event)
{
new Ajax.Updater("memberSelect",
"/chainedSelect/family/updateSelect",
{method:'get', parameters: {selectedValue : $F("familySelect")} }
);
}
Here is the Grails method:
def updateSelect = {
def familySelected = Family.find("from Family as family where family.surname=:surname", [surname:params.selectedValue])
render (template:"selectMember", model : ['familySelected' : familySelected])
}
If someone could just explain what the third parameter of the AJAX function is doing I think I can figure the Grails part out.
{method:'get', parameters: {selectedValue : $F("account")}}
If someone could just explain what the third parameter of the AJAX
function is doing
The third argument is an object of parameters that get passed to the Updater that tell it how to make the HTTP request to the server.
Make the request an HTTP GET request:
method:'get'
Pass the following named query parameters:
{selectedValue: $F("account")}
$F is a prototype shortcut to retrieve the value of an element. In this case, it's getting the selected value of the DOM element with id account.
This ultimately results in something like the following request:
GET /chainedSelect/family/updateSelect?selectedValue=someValue
Where "someValue" is the currently-selected item in the "account" select list.

Resources