If you have developed a web application and are concerned if your users will have any issues with your web app on a 64-bit Windows machine, you might find this helpful.
I needed to do this research for the web applications I have written and maintain.
If your application uses PDF to deliver content, then the 64-bit user should be using Adobe Acrobat 8.1+. According to Adobe “Adobe Acrobat 8.0 was not developed for the Windows XP x64”, but 8.1+ versions do support 64-bit machines. The latest version is 9.x, which supports 64-bit.
If your application uses Java Plug-in, then the 64-bit user needs to use a 32-bit browser and they will be good. According to www.java.com “Currently Java Plug-in, Java Web Start, and Java Control Panel are not available for 64-bit systems. However you can still download 32-bit version of JRE, in order to use Java Plug-in and Java Webstart on 64-bit systems.
Note: Make sure to have 32-bit version of browser installed on your 64-bit machine as the Java plug-in works only with 32 bit version of browser.”
So if you are using Adobe Acrobat or the Java Plug-in, you will not have any code changes! It just falls on the Help Desk to verify that the users follows the vendor's recomended configuration.
That's good news to me!
Monday, January 5, 2009
Friday, January 2, 2009
Read XML files to List of XML Strings Dynamically
I needed to dynamically get XML files into a list of strings for load testing a web service. To improve performance this list needed to be static, but I wanted it to also be random. So here is what I came up with:
A class to load and contain the list of xml string from xml files:
Now to call it from the webTest inside of the GetRequestEnuberator().
To get the string for FormPostParameters, I create a string like this:
And here is the random method:
This will allow you to just drop xml files into the directory "TestXMLFiles" and they will be randomly put into your load test. I think it's cool. ;)
A class to load and contain the list of xml string from xml files:
public class TestXMLFiles
{
private static List_xmlStrings;
public static ListXmlStrings
{
get
{
if (_xmlStrings == null)
{
try
{
// get files
string[] _files = System.IO.Directory.GetFiles("../../../WebService_LoadTest/TestXMLFiles", "*.xml");
// create list for strings
_xmlStrings = new List(_files.Length);
System.IO.StreamReader _stream;
// cycle through files
foreach (string _file in _files)
{
// open stream to file
_stream = System.IO.File.OpenText(_file);
using (_stream) // this will dispose of stream when done
{
// read from steam to list
XmlStrings.Add(_stream.ReadToEnd());
}
}
}
catch (Exception e)
{
throw e;
}
}
return _xmlStrings;
}
}
}
Now to call it from the webTest inside of the GetRequestEnuberator().
To get the string for FormPostParameters, I create a string like this:
String _xml = TestXMLFiles.XmlStrings[getRandomXML()];
And here is the random method:
private int getRandomXML()
{
Random rand = new Random();
return rand.Next(0, TestXMLFiles.XmlStrings.Count);
}
This will allow you to just drop xml files into the directory "TestXMLFiles" and they will be randomly put into your load test. I think it's cool. ;)
Thursday, January 1, 2009
Javascript and complex field names
If your web form has need for a more complex naming structures for the field names like "user.first_name" instead of the basic "firstName". Then you might have run into issues trying to access these fields for a javascript form validation.
For the basic field name like "firstName":
<input type="text" name="firstName" value="">
You could access this by using the following:
_form.firstName.value
But if you are using the more complex naming structure like "user.first_name":
<input type="text" name="user.first_name" value="">
The _form.user.first_name.value will not work. You need to access it like this:
_form["user.first_name"].value
For more consistent style of code when using complex field names you should go ahead use the style _form["blah"].value for all of the elements in your javascript.
Have a great Day!
For the basic field name like "firstName":
<input type="text" name="firstName" value="">
You could access this by using the following:
_form.firstName.value
But if you are using the more complex naming structure like "user.first_name":
<input type="text" name="user.first_name" value="">
The _form.user.first_name.value will not work. You need to access it like this:
_form["user.first_name"].value
For more consistent style of code when using complex field names you should go ahead use the style _form["blah"].value for all of the elements in your javascript.
Have a great Day!
Labels:
form,
javascript,
validation,
web
Subscribe to:
Posts (Atom)
