Hi,
I'm using the Telerik test studio to create tests for my Silverlight application.
Running into a scenario where I'm unsure how to proceed.
Now - my application has dynamically generated dataforms. Meaning, I've created the data entry forms dynamically using Class properties. To show/hide columns I've used data annotations - [Display(AutogenerateField=True)], I'm reading through each class properties and generating controls like RadMaskedTextBox, checkbox, RadComboBox, RadDateTimePicker (mostly telerik) controls etc.
I have a lot of forms like these. To test these forms, I do not want to create an object for each of these controls in each form in the telerik test application.
Instead I want to dynamically identify the following controls on whichever form i navigate to:
1. Required fields (in my case properties with [Required] attribute on it), whose labels appear in bold
2. Different types of controls like RadDateTimePicker (properties of type datetime/datetime?), Checkbox (properties of type boolean), RadComboBox, RadMaskedTextBox, RadMaskedCurrencyInput, UserControl (customized to display radio buttons, browse control, upload controls)
#1 is on priority since I can get my Add new to work without validation errors.
#2 is necessary for Add/Edit forms and add/modify values in various controls.
Once I can get these controls dynamically in my test application I should be able to fill data into it and perform save operation.
Till now I was able to record my form filling activity in the test application. But this approach creates an object for each control of each form in the project. The project is quite large and I don't wanna end up making n number of objects in my test application. I want to be able to reuse the tests for the forms which are generated dynamically thus reducing application size, time and effort spent to create tests.
Attached find a zip file with 2 sample projects -
1. Sample Silverlight project where i have implemented a part of our project's structure i.e. Dynamically generated 2 forms based on class properties. Used a common view and 2 different view models.
2. Sample Telerik Test Project in which I recorded the actions done on my SL project.
Then I customized each step in code to check what exactly occurred.
As you can see in the sample - A different object was created for each control - the textbox, date time control, combobox etc for each form. Although the controls are actually the same..
I need a way to 1. dynamically load these controls and fill data into it or 2. have only one instance of this control object in my test application and still be able to access it for any form.
Kindly help.
I'm using the Telerik test studio to create tests for my Silverlight application.
Running into a scenario where I'm unsure how to proceed.
Now - my application has dynamically generated dataforms. Meaning, I've created the data entry forms dynamically using Class properties. To show/hide columns I've used data annotations - [Display(AutogenerateField=True)], I'm reading through each class properties and generating controls like RadMaskedTextBox, checkbox, RadComboBox, RadDateTimePicker (mostly telerik) controls etc.
I have a lot of forms like these. To test these forms, I do not want to create an object for each of these controls in each form in the telerik test application.
Instead I want to dynamically identify the following controls on whichever form i navigate to:
1. Required fields (in my case properties with [Required] attribute on it), whose labels appear in bold
2. Different types of controls like RadDateTimePicker (properties of type datetime/datetime?), Checkbox (properties of type boolean), RadComboBox, RadMaskedTextBox, RadMaskedCurrencyInput, UserControl (customized to display radio buttons, browse control, upload controls)
#1 is on priority since I can get my Add new to work without validation errors.
#2 is necessary for Add/Edit forms and add/modify values in various controls.
Once I can get these controls dynamically in my test application I should be able to fill data into it and perform save operation.
Till now I was able to record my form filling activity in the test application. But this approach creates an object for each control of each form in the project. The project is quite large and I don't wanna end up making n number of objects in my test application. I want to be able to reuse the tests for the forms which are generated dynamically thus reducing application size, time and effort spent to create tests.
Attached find a zip file with 2 sample projects -
1. Sample Silverlight project where i have implemented a part of our project's structure i.e. Dynamically generated 2 forms based on class properties. Used a common view and 2 different view models.
2. Sample Telerik Test Project in which I recorded the actions done on my SL project.
Then I customized each step in code to check what exactly occurred.
As you can see in the sample - A different object was created for each control - the textbox, date time control, combobox etc for each form. Although the controls are actually the same..
I need a way to 1. dynamically load these controls and fill data into it or 2. have only one instance of this control object in my test application and still be able to access it for any form.
Kindly help.