1

Closed

Testing Toolkit with Dynamics AX 2009 Demonstration Toolkit - Refresh 2

description

Hi, i'm testing the toolkit with demo refresh 2 and is currently only getting the just login loadtest to work. When trying to do sales orders I get an indexoutofrangeexception with the text Cannot find column 1. I've guess this has something to do with the parameters - as I'm running this against the standard demo environment i've used small set of customer accounts from this database for the customerId csv file. These are simple format account numbers as 1103, 1104 and so on - the same formats applies for the other SO_* files
 
Any Ideas would be much appreciated - and thanks for a great looking kit -
 
Regards Dennis

file attachments

Closed Oct 27, 2010 at 2:23 PM by rayben
I have solved this with Henrik offline.It seems that our dataset contains E as the beginning, and we throw out the first digit in the range. If you look at Microsoft.Dynamics.Benchmark.LoadTestPlugin\SalesAndDistribution.PerformanceBenchmarkPlugin.cs on line 104 you will see the following code private String GetRandomItemId() { DataRow dataRow = itemDistributionTable.Rows[itemNumberDistributionGenerator.Next(itemDistributionTable.Rows.Count)]; String min = dataRow[0].ToString(); String max = dataRow[1].ToString(); Int32 iMin = Convert.ToInt32(min.Remove(0, 1)); Int32 iMax = Convert.ToInt32(max.Remove(0, 1)); return 'E' + itemNumberGenerator.Next(iMin, iMax).ToString(); }For your purpose, I am assuming that you have real item’s like '1234' in your database. So you will want to change it to this private String GetRandomItemId() { DataRow dataRow = itemDistributionTable.Rows[itemNumberDistributionGenerator.Next(itemDistributionTable.Rows.Count)]; String min = dataRow[0].ToString(); String max = dataRow[1].ToString(); Int32 iMin = Convert.ToInt32(min); Int32 iMax = Convert.ToInt32(max); return itemNumberGenerator.Next(iMin, iMax).ToString(); }Additionally, in the SalesAndDistribution.cs file where the exception is being thrown, there is code to handle certain items in a special manner. In this case, items that start with ‘2’ will have the InventBatchId property added, and those that start with 3 will come from a random warehouse location. This is most likely not needed in your case, and all of the code can be removed except for what is in the else{} clause: int iItemNum = Convert.ToInt32(itemId.Substring(1, 1)); // for ex. 3 will be picked on the item E317505 int iItemNum2 = Convert.ToInt32(itemId.Substring(2, 5)); // for ex. 17305 will be picked on the item E317505 if (iItemNum == 2) { Int32 iBatch; iBatch = 20000000 + (randGenerator.Next(0, 19) * 20000) + iItemNum2; inventDimFields.Add("InventBatchId", ("BAT" + iBatch.ToString())); inventDimFields.Add("InventLocationId", "GW"); } else if (iItemNum == 3) { String[] wh = new String[5] { "EW", "NW", "SW", "GW", "MW" }; String[] wmsLocn = new String[4] { "001-01-101", "001-01-102", "001-01-103", "001-01-104" }; inventDimFields.Add("InventLocationId", wh[randGenerator.Next(0, 4)]); inventDimFields.Add("wmslocationid", wmsLocn[randGenerator.Next(0, 3)]); } else { inventDimFields.Add("InventLocationId", "GW"); }Unfortunately, the toolkit is not designed to be run as a ‘set it up and go’ scenario. It is very much custom to the dataset and workload that you are running it against

comments

rayben wrote Mar 10, 2010 at 4:27 PM

Hi Dennis, can you please include your CSV files for SO_*

Thanks

dennis_t wrote Mar 11, 2010 at 8:41 AM

Hi Ray - started out with just the one customer 1103 in the customer csv, i've added some more just to se if i got any other reaction

Thanks / Dennis

wrote Mar 11, 2010 at 8:41 AM

hhasselblad wrote Sep 2, 2010 at 11:32 AM

Hi,
I am also testing with demontration tookit 2. Did you ever fix the problem?

I get below when funning SO Full Sales header works fine but it failes during creation of saleslines.

TestError TestError 2 Test method Microsoft.Dynamics.Benchmark.TestProject.SalesAndDistribution.CreateSalesOrderFull threw exception: System.Exception: Error is .. Index and length must refer to a location within the string.
Parameter name: length.

Br
Henrik

wrote Oct 27, 2010 at 2:23 PM

wrote Feb 13, 2013 at 11:24 PM

wrote May 16, 2013 at 5:35 AM