Dynamic requests with JMeter - jmeter

I want to use JMeter to do load testsing.
I will use the requests to simulate user behavior on my website.
Depending on what a user is filling out on the page, new fields may appear and these must be filled out.
For example if a user chooses a value in a dropdown box, depending on this value can appear below the text fields and / or the radio button group, etc. it is quite unpredictable so the possibilities are wide.
That's why I made a little program with Selenium to build a dataset based on what the application presents to me as fields.
So I can not present a CSV with a quantity of fixed columns since this one is dynamic according to the different choices of the users.
How would you have implemented this?

Related

Best way to handle binding a List<Object> with in an EditorTemplate

I have a scenario where I must show the user four combo boxes. Each combo box has a list of system users. There are some roles in the system, but there are four important ones, and that's why we have four combos. Each combo box is already filtered by role id for the system users. The four combo boxes do not depend on each other (no cascading).
Here is the UI hierarchy:
Ultimately, I require the List<ApproverUser> to receive modified when this whole thing is submitted. The form element sits in the first EditorTemplate: LetterEditor.
Plan:
For the UI, at least, I see myself
running a loop for all roles ordered by role sequence
render a combo box and load data passing the role id to get filtered system users
Now, the user should be able to pick each approver in the four combos, and also, if in the future, the approvers increase, I won't be hard-coded to four combos only.
The issue I foresee is how this will correctly map back to the List<ApproverUser> on the model.
Any guidance is appreciated.

Oracle Apex create a form that is split into multiple regions

I have a merchant application form that I want to split up into multiple regions so that the user only has to see one section of the application at a time. Each region is tied to the same table therefore:
Each region would have to share the same primary key
I only want one submission of the form items at the end of the form
I read this post Create an Apex form with multiple pages
which makes it seem like an easy to do process by using the Hide and Show Region template and manually separate the form into multiple regions. The problem I'm running into is that Apex requires a primary key to be tied to each form region, but you also can not have duplicate items on the same page. Any ideas?
-- attaching the PNG of the error message here Primary Key ERR
To me, it looks like a single page with several regions. Doing so, you'd have only one primary key item.
Logically, you'd separate items into different regions. Each of them should use its "Server side condition" which would decide whether to render (i.e. display) that region at certain time or not. It means that it doesn't have to be a hide and show region (besides, it is always here and visible, user just decides whether to reveal its contents or not). You'd create any region type (even an ordinary HTML region).
For example:
the first region displays customer ID, name and address. Other regions are "hidden" because e.g. P1_ID IS NULL is met as no data has been submitted yet. Once user enters ID, name and address and submits the page, P1_ID gets its value which enables other region(s) to be displayed
the second region contains items about some other customer's data; it is now visible because P1_ID is no longer NULL, but 3rd region is still hidden as you didn't enter some required data in the 2nd region which would let the 3rd region to be displayed.
and so forth
Note that the post you are referring to is 6 years old. That is like medieval in apex terms - so much has changed since then.
This is a way to do it if you want multiple pages. Just create multiple pages with the same form (using the create form functionality) and depending on the functionality needed on a specific page you delete the page items you don't want to show. If a database column is not included in the form it will not be touched by the dml process. This should be relatively simple to create.
Note: if you want to get up to speed on forms, read this blog

ServiceNow Add a Form Section to multiple Configuration Items

I am currently working on a project in ServiceNow that requires me to configure around 500 descendants of the Configuration Item table by adding multiple form sections to the CI's with around 10-20 fields in each of these form sections. I currently am doing this by going into the Form Design for each CI, and manually adding these form section and fields for every CI individually, which takes far to long to do for 500 CI's.
Is there a way to add a form section to multiple CI's without having to go into the form design on every CI you want to change and adding it manually?
Technical answer: yes, because all of that form layout data is stored in tables (sys_ui_form_section, sys_ui_section, sys_ui_element, etc) that you could script to insert relevant records. However, due to the complexity (form sections, form elements, ordering) and the potential to run into conflicts (forms differ between tables), I would recommend this only as a last resort.
I think the real question is why is it required to have all of those fields displayed on the forms? If you're populating data from Discovery or a large import, can those fields just be visible by a list page, or just be available to use in filters? Will users actually be clicking to view a CI record and need to see that data on the form? The other part to consider is which view you are adding all of these form sections and fields to. As an example, a user won't see the data on a reference field hover if you're only making changes to the Default view, and won't see any of the fields on a mobile device if you don't add to the Mobile view.

COLDFUSION CFGRID Datapass with a post

I have a bit of a unique challenge today. I have a client that wants to be able to search for multiple items based on inserts into a cfgrid. Suppose we have the following web form:
A Country selection dropdown
A State Selection dependent AJAX dropdown
A city Selection dependent AJAX dropdown
An ADD Button
----------------------------------------------------
A CFGRID that will populate a row with selections when the user clicks the add button
----------------------------------------------------
And finally, a CLEAR button, and a GO button on the bottom.
The resulting page will then query the database and get some statistics about the cities selected. So, suppose an individual picks USA > Arizona > Scottsdale and USA > Arizona > Flagstaff. The grid below the options will 'save' each selection and reset to their default options, waiting for a user to pick additional options or click on 'GO'.
The resulting page will then generate columns that list some statistics about the communities and highlight the 'best of' between each selected community.
Each time a user selects the ADD button (assuming three criteria are selected) I want the information to be added into a CFGRID that displays the options selected. Then, After the user selects at least one country/city/state option, have all of the data in the CFGRID get passed to another page that does a query from the data selected. In theory, the user could pick as many communities as they want, assuming they are willing to let the database sludge through enough data to get what they want and wait through a 'loading' screen to get it.
I'm having these challenges, in no particular order:
- I have an HTML grid that I must use per client spec (No Java or Flash, must be HTML)
- I have no idea how to get the selected options into the CFGRID. I assume there is some JavaScript I can write that uses some sort of AddRow function to add data into the grid with the add button but cannot seem to find how to it on the interwebs
- After we conquer the above challenge, how do I pass the data from the grid into the results page? I thought about passing one big string or a structure, but I'm not sure how to do that through the URL or posting, nor how to get the data out of the grid. I wonder if I am better off coding some sort of string that gets passed from the options page to the results page with a get method instead of dealing with the stuff in the CFGRID and have the CFGRID serve only as a 'dummy' display container.
- Finally, after the pass is complete, I would need to loop through through the structure and perform a CFQUERY or CFSTOREDPROC on each row of data, then get the statistics I need to display on the results page. I assume this would depend on how I am getting the data from the options selection page to the results page.
THANK YOU ALL!
CFGRID is great to start, but it can be b*tch to customize and extend... Have you tried editable CFGRID with bind? See how far off it is from what you want first. If it turns out to be very far, then you might want to go for a jqGrid and code up some jQuery.
To start, read Using HTML grids and make the cfgrid editable.
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-72e0
Once you got that working, look at these provided JS functions that you can use with CFGRID
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS0ef8c004658c1089-6262c847120f1a3b244-8000.html
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSd160b5fdf5100e8f-4439fdac128193edfd6-7f5f.html
If you still demand a bit more, you might need to dig into the underlying ExtJS component. At that point I would rather use jqGrid
I found out that the best way to handle this was by using a SerializeJSON call and a Deserialize JSON call back and forth. By using JavaScript notation we are able to pass a complex JavaScript object (array) between one page and another. This has the value add of not having to worry about sessions timing out and making URLs clickable from one solution to the next.

Alternative function for group inorder to improve the performance in a xfrom

Can we use an alternate function other than group to perform the same action. The scenario I am trying to workout using group is - I have multiple pages in a form and a summary button on the first page which on being clicked should show the summary of all pages.
The logic we tried was using group to club each individual pages by having a form variable which turns true when the summary button is clicked and we check this variables value in all pages and so when the summary button is clicked this condition satisfies and all the pages are displayed.
The Code Snippet
<Xforms:group id="page-1"
ref=".[instance('form')/current-page = '1'
or
instance('form')/summary = 'true']">
Using group fn drastically depreciates the performance. Is there any method to perform the same scenario. Kindly advise.
At this point, hidden groups and hidden cases work differently:
The controls in hidden groups are non-relevant.
The controls in hidden cases are relevant.
As a result, using a switch/case, the server has to do more work to maintain and update the state of controls in hidden cases, but switching to a another case is very fast: it is pretty much just a matter of changing a class in the HTML, as the values of all the controls are already there. With hidden groups, when "switching to another group", the values for the controls in that group are sent by the server to the browser. Updating the values can take a little bit of time, especially if you have a lot of controls, say in a repeat.
It is hard to give a recommendation without really running your code, but if the time taken to do a switch is mostly spent on the browser, you could investigate using the full update mechanism. If the time is mostly spent on the server, then I'd look into XPath analysis. (Note that both features are PE-only.)

Resources