Visual Studio 2010 performance testing - visual-studio-2010

I am using visual studio 2010 for performance/load testing. I am load testing a product details web page that accepts a product id via query string parameter. I am using a CSV file to pass values to the query string parameter during execution of the test. The test sends a request for every product id in that CSV file. How can I modify the test to dynamically select a single product id randomly?

One of the properties of the data source is the Access method. It has the values:
Random as its name suggests chooses random entries from the data source.
Unique processes each data source item once in their file order. When all have been processed the test case will not run any more. Other test cases may continue to run.
Sequential is the default. Processes each data source item in their file order. When all have been processed starts again at the first one.
Setting the access method to random should be what you want.

Related

Is it possible to extract data from the body of an outlook email and throw it in SQL automatically?

Situation: We get audit emails every morning. The body of the email contains a table with various columns. The column labelled 'ID' is the unique key for each row. I have to copy the data from the ID column, format it in note++, and then paste it in a pre-filled query in SQL were I run it.
Question: Is it possible to automate this process? if so, where could I start? I would be nice if I could have something that either runs automatically or manually, reads the email, extracts the data from the column, formats it, and throws it in a query and executes.
Additional Details: The emails are always from the same distro, fire at the same time every day, and the table columns are static.
My skill Level: Beginner but resourceful and eager to learn, so please don't crucify me if I am not clear.
Yes, it is possible. You can develop a VBA macro or a COM add-in if you need to distribute your solution on multiple machines. Basically you are interested in handling the NewMailEx event of the Application class which is fired when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection array to call the NameSpace.GetItemFromID method and process the item. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem.
After retrieving the incoming item you can process it by getting property values and adding them to the SQL Db.
You may find the Walkthrough: Create your first VSTO Add-in for Outlook article helpful.

Is possible to select different table cells for different threads in same sampler in JMeter record and play back

I want to load test following scenario.
1.Submit student details in basic data insert page.
Result : Added record just bind into table grid in same page.
2.Click on edit button of particular added record in table.
3.Change student name and click on save again.
My key load test scenario is record edit scenario. I used CSV data config for test parameters. I want to know is it possible to select different table cells with different thread requests in same sampler to test my scenario in same tread group.
Please refer the attachment for sample screen.enter image description here
CSV Data Set Config element has Sharing Mode setting, by default it is All Threads.
This means that CSV file is shared across all JMeter threads and each Thread (virtual user) takes the next line each iteration so default configuration should be fine for your use case, just add more threads and/or loops in Thread Group or Loop Controller and JMeter will pick up the next line for each thread/iteration.
See CSV Data Set Config in Sharing Mode - Made Easy article for more information.

Can you pregenerate GUID's on content types?

A PowerShell script created content types and assigns them to a list. When running SPMetal to generate the DataContent class file, the GUIDs are only associated with the site collection SPMetal is called from. The Visual Studio solution's Linq-to-SP queries don't work on another site collection because the PowerShell script creates content types on another site collection with a different GUID.
Is there a way to manually specify the GUID in PowerShell or overwrite the content type's GUID in Visual Studio, so Linq-to-SharePoint queries query the correct content type GUID on any site collection?
Thank you in advance.
There was no way to fix the Linq-to-SharePoint queries on custom content types that I could find. The GUIDs were hard coded into the class file imported into Visual Studio. The solution would work on one site collection, but not another.
The project had to be recoded to query the list without Linq-to-SP and the data context.
The only problem with this is if you initially pull 100 records, then filter with joins, your results would be less than 100, which is what you initially wanted. You may have to pull "Take()" more than 100, then finish your join with Take(100) to get the desired quantity.

Pick multiple items in JMeter CSV Data Set?

I have a JMeter test that uses a CSV Data Set Config to provide a list of products for each simulated user to purchase.
The test is simple:
login
pick product to add to cart
checkout
logout.
This has worked well and now I want to simulate a user purchasing N products. I first tried duplicating the controllers that pick a product and also tried putting those in a loop controller, but in both cases they just add the same product to the cart repeatedly.
What I want is for each user to pick multiple items from the CSV file. I tried modifying settings for the CSV Data Set Config, but I get the same results no matter what I set it to. Am I missing something or is this expected behavior?
How do I get a thread to pick different items from the CSV file?
Is my only choice to provide multiple CSV files and use multiple CSV Data Set Configs?
Your option is to use __StringFromFile function inside a Loop Controller
You could then use some Beanshell to process the line and split items.

Sharepoint Designer 2007 Workflows

In Sharepoint designer 2007, I am creating a workflow where I am trying to use 'collect data from a user' for multiple users. In my document library, I have a list name field. That list name field ties to a list which has between 1-15 users in the associated list. I only need to collect data from user for those users in the list that are not null/empty. I would also like to collect data from the users at the same time (parallel).
It appears you can only use parallel within one workflow step. Within one workflow step, it doesn't appear that you can set multiple conditions/actions.
What I need to do is this:
Condition 1: If variable:reviewer1 is not empty
Action 1: Collect Document Review from variable:reviewer1 (output to ...)
Condition 2: If variable:reviewer2 is not empty
Action 2: Collect Document Review from variable:reviewer2 (output to...)
Is there a way to do this that I'm missing?
Thanks!
It'll be tedious, but I'd suggest creating N steps (where N = the number of parallel tasks you want)
Each step will generally do the following:
Check if the current reviewer field is empty (if so, skip to the next step)
Create a new "Task" item in a (task) List
Send an email to the person you assigned the task to
Then you'll need to somehow stop your workflow until all of the tasks have been completed. This part gets a bit trickier, but do some searches on creating a State Machine workflow in SharePoint Designer and you'll be on the right track.
Really though, this sounds like a workflow that's too complex for SPD. Use Visual Studio or some 3rd-party workflow solution if at all possible.

Resources