Wednesday, June 29, 2011

JMeter: Distributed Test

I want to set up a distributed testing in my network. Then, I prepare a new vm and configure the settings. You can follow the instruction in the link below:



After the configuration, I run the ApacheJMeter.jar as normal. The next step, I click Run=>Remote Start=>127.0.0.1 and an error message is popped up: 

"Connection refused to host: 127.0.0.1;nested exception is: java.net.ConnectException: Connection refused: connect"


After my investigation, I discover something which can explain above message. If you clcik Run=>Start, the application functions fine. If you click Run=>Remote Start=>127.0.0.1, please run jmeter-server.bat. It is because the application treat the localhost as one of the slaves. 

Everything works fine when I run this bat file.

Friday, June 17, 2011

OpenXml: add reference to System.IO.Packaging

In order to use the API of OpenXML, I need to add a reference to "System.IO.Packaging" to the .Net project.

In a C# file, I cannot reference the .dll directly using "System.IO.Packaging".



Then, I  right click the Reference and then select "Add Reference..." under Solution Explorer 


But I cannot find "System.IO.Packaging" under Tab ".Net"


After my searching, I know that I need to add a reference to "WindowBase" instead of "System.IO.Packaging"


Then, I can reference successfully.



Tuesday, June 14, 2011

Jet 4.0: columns data type in Excel file

Under Jet 4.0, by default, it determine the column data type by first 8 rows.

If you want to the driver determine the data type considering all rows, you can edit the "TypeGuessRows" in Registry Editor.

Go to the Registry Editor by typing "regedit" in cmd, 


Under Registry Editor, go to HKKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel



Then, Edit the value "TypeGuessRows" to 0 which means consider all rows to guess data type.