Open CodedUITestAmazon.cs file - double click in Solution Explorer
Add using directive to enable calls to custom methods and assertions that
will be added to the UIMap1.cs file
Scroll to the end of the file to add the Constructor to make a new
instance of UIMap1 named UIMap after “private TestContext testContextInstance”
Sunday, January 4, 2015
Friday, January 2, 2015
STEP #3 Add Controls to UIMap1.uitest - this is a partial class so the generated code will be added to UIMap1.Designer.cs and we'll add custom code to UIMap1.cs
Load IE and browse to Amazon.com
Go back to Visual Studio, right click UIMap1.uitest and select “Edit with Coded UI Test Builder” and the builder loads in the lower right corner with Amazon.com open in IE
Left click and hold down the Cross Hair button, then drag to highlight the control to be added to the UI Map
Go back to Visual Studio, right click UIMap1.uitest and select “Edit with Coded UI Test Builder” and the builder loads in the lower right corner with Amazon.com open in IE
Left click and hold down the Cross Hair button, then drag to highlight the control to be added to the UI Map
Click the double arrow in top left corner ≪ and
the UIMap is displayed
Click button in upper left corner to add the control to the map
The checkmarks turn dark gray but the UIMap has not been updated yet
Click the Generate code button to add controls to the map
You are prompted that there are no code changes except updates to the
UIMap
Click Generate button and close the builder to return to Visual Studio
Double click UIMap1.Designer.cs and search for the control that was
added - This tells you which properties the tool uses to identify the control on
the page
UIMap1.Designer.cs contains the generated code that gets overwritten each
time the solution is built
STEP #2: Rename the default CodedUITest1.cs file and dependencies
Right click CodedUITest1.cs file in Solution Explorer and rename to
CodedUITestAmazon.cs
Hit Enter and you will be prompted with message: “You are renaming a file. Would you also like to perform a rename in this project to all references to the code element ‘CodedUITest1’?”
Hit Enter and you will be prompted with message: “You are renaming a file. Would you also like to perform a rename in this project to all references to the code element ‘CodedUITest1’?”
Click Yes and name is changed where the green indicators are displayed in
the left column
You can also rename in the comments from CodedUITest1 to
CodedUITestAmazon
STEP #1: Create New CodedUITest Project and manually add UIMap named UIMap1.uitest instead of UIMap.uitest Create CodedUI Test Project and add new UIMap1.uitest file
Select Templates> Visual C#> Test> CodedUITest
Enter name for Project and same name is used for the Solution, make sure
Add to source control is unchecked, and click OKClick Cancel at message at prompt “How do you want to create your coded UI test”
Right click Project and select Add> New Item
Select Test under Visual C# items, select Coded UI Test Map, keep default name of UIMap1.uitest, and click Add
The CodedUI Test Builder loads - Click X in upper right corner to Close
Now you are back to Visual Studio with an empty UIMap1.uitest
Tuesday, December 30, 2014
CodedUI Test manually add assertion method, log messages using TestContext.WriteLine, and using UIMap named UIMap1.uptest instead of UIMap.uitest
I am creating this post about manually updating CodedUI Tests as part of a training exercise for another QA Engineer.
I used Amazon.com as an example, but it 's the same idea with any web application.
Here are the requirements of the CodedUI Test Project:
I used Amazon.com as an example, but it 's the same idea with any web application.
Here are the requirements of the CodedUI Test Project:
- We don't want to use the CodedUI Test Builder to generate the methods and assertions - we will use the builder to update the UIMap and then hand code the methods and assertions; hand coding of assertions and methods is a good idea because we can avoid extra code that gets generated like hover, mouse over, ect.
- Create a UIMap named UIMap1.uitest instead of UIMap.uitest - this is because we are going to hand code the assertions and methods; potentially we could make a separate UIMap for each section of the web application
- Generate logging messages using TestContext.WriteLine("message"); -- we could also use Console.WriteLine("message);
- Browse and load site using TestInitialize section of the CodedUITest.cs file
- Add multiple [Test Method] statements to one CodedUITest.cs file instead of one [TestMethod] for each CodedUITest.cs file
- When the test is run the test method is selected from the Test Explorer - this is a good idea because we have a better idea where the failure occurs if we name our Test Methods with meaningful names
STEP #1: Create New CodedUITest Project and manually add UIMap named UIMap1.uitest instead of UIMap.uitest
STEP #2: Rename the default CodedUITest1.cs file and dependencies
STEP #3: Add Controls to UIMap1.uitest - this is a partial class so the generated code will be added to UIMap1.Designer.cs and we'll add custom code to UIMap1.cs
STEP #4: Add the Using directive and Constructor to the CodedUITestAmazon.cs file
STEP #5; Add code to TestInitialize section of the CodedUITest.cs file that loads IE, browse to URL, and log message
STEP #6: Add Custom Assertion to CodedUITest.cs file that verifies properties of an HtmlHyperlink and logs messages using TestContext.WriteLine
Saturday, August 23, 2014
Tuesday, July 29, 2014
Configuration Manager 2012 Client Actions
Configuration Manager 2012 Client Actions can be run
independently from schedules that are configured in Configuration Manager
Console through Control Panel>Configuration Manager on the client machine.
1) Application
Deployment Evaluation Cycle: This evaluation Cycle is applicable to
software deployments (applications) .This action will re-evaluates the
requirement rules for all deployments and make sure the application is
installed on the computer. The default value is set to run every 7 days.
2) Discovery
Data Collection Cycle: This action can
be considered as Heartbeat Discovery cycle and will resend the client
information to site and keeping the client record Active. This is also
responsible to submits a client's installation status to its assigned
site(Status:Yes).If you are migrating the client from SP1 to R2 or R2 to CU1
,it takes time to get the client version update in Console and update action is
carried out by this Cycle. Heartbeat Discovery actions are recorded on the
client in the InventoryAgent.log. Computers accidentally deleted from the
configmgr console will automatically
"come back" if it is still active on the network. Wait for the next
heartbeat inventory cycle, try running Discovery Data Collection Cycle manually,
or use custom script. Refer to this
link for more information about what is sent back
3) File Collection
Cycle: This action is to search for a specific file that you have defined
in the Client Agent settings (Software inventory > collect files). If the software inventory client agent finds
a file that should be collected, the file is attached to the inventory file and
sent to the site. This action differs from software inventory in that it actually
sends the file to the site, so that it can be later viewed using Resource
Explorer. The site server collects the five most recently changed versions of
collected files and stores them in the \Inboxes\Sinv.box\Filecol directory. The file will not be
collected again if it has not changed since the last software inventory was
collected. Files larger than 20 MB are
not collected by software inventory. Maximum size for all collected files (KB)
in the Configure Client Setting dialog box displays the maximum size for all
collected files. When this size is
reached, file collection will stop. Any files already collected are retained
and sent to the site.
4) Hardware
Inventory Cycle: The first and very important action to send client
inventory information. This is where most time is spent troubleshooting about why the client is not reporting
inventory from X days .Many folks think that, hardware inventory is actually
getting information about hardware but it is more than that. It inventory
information about add and remove programs, OS info, RAM, disk and many things. Hardware
inventory is WMI inventory that collects the information from WMI , based on
the settings you defined in Client agent settings—>Hardware inventory
.Configmgr client will collect only the information that you have
selected/customized in client agent settings
and send it to server. Hardware inventory information will be logged
into inventoryagent.log
5) ID MIF
Collection Cycle Management Information Format (MIF) files can be used to
extend hardware inventory information collected from clients by the
Configuration Manager 2007 hardware inventory client agent. During hardware
inventory, the information stored in MIF files is added to the client inventory
report and stored in the site database, where you can use the data in the same
ways that you use default client inventory data. Two MIF files can be used when
performing client hardware inventories: NOIDMIF and IDMIF. By default, NOIDMIF
and IDMIF file information is not inventoried by Configuration Manager 2007
sites. To enable NOIDMIF and IDMIF file information to be inventoried, NOIDMIF
and IDMIF collection must be enabled. You can choose to enable one or both
types of MIF file collection for Configuration Manager 2007 sites on the MIF
Collection tab of the hardware inventory client agent properties. For more
information about enabling MIF collection for Configuration Manager 2007 sites
during hardware inventory, see Hardware Inventory
Client Agent Properties: MIF Collection Tab.
6) Machine
Policy retrieval and Evaluation Cycle: This action is to download policies
assigned to the client computer. Anything that you assign to a collection (group
of computers) like client agent settings or applications related to deployment.
This action will be triggered based on a schedule defined in Client agent
settings (Policy polling interval (minutes). This action results will be logged
into policyagent.log, Policyevalutor.log, and policyagentprovider.log
7) Software
Inventory Cycle: Unlike hardware inventory, software inventory, inventory
information about file system data and file properties such as .EXE. You can customize what executable files to be inventoried which
allows admins to report on software inventory. When this action runs, it
inventories the information in the file header of the inventoried files and
sends to the site. This information will
be logged into inventoryagent.log on the client. If you are experiencing slow
software inventory issues, refer to this
link
What is the difference between Hardware and Software
Inventory?
* Software Inventory works on files to get
information in the file header
8) Software
Metering Usage Report Cycle: The name itself says, metering which means, configmgr
client monitor and collect software usage data for the software metering rules
that are enabled on the Site .Client computers evaluate these rules during the
machine policy interval and collect metering data and send it to site.
9) Software
updates deployment evaluation Cycle: This action will initiate a scan for
software update compliance. This action evaluates the state of new and existing
deployments and their associated software updates. This includes scanning for
software updates compliance, but may not always catch scan results for the
latest updates. This is a forced online scan and requires that the WSUS server
is available for this action to succeed.
This action results will be logged into couple of log files on the
client: scanagent.log (scan requests for software updates), UpdatesStore.log(Status
of patches like missing, Installed),UpdatesDeployment.log(update activation,
evaluation, and enforcement, notify about reboot) etc. More info about software update
compliance
10) Software
Update Scan Cycle: This action scans for software updates compliance for
updates that are new since the last scan. This action does not evaluate
deployment policies as the Software Updates Deployment Evaluation Cycle does.
This is a forced online scan and requires that the WSUS server is available for
this action to succeed. This action results will be logged into WUAHandler.log
(if Scan is succeeded or not), UpdatesStore.log(Status of patches like missing,
Installed),and scanagent.log (scan
requests for software updates) etc
11) User Policy retrieval
and Evaluation Cycle: This action is similar to Machine Policy Retrieval
& Evaluation Cycle, but this will initiate an ad-hoc user policy retrieval
from the client outside of its scheduled polling interval. This action results
will be logged to policyagent.log, Policyevalutor.log, and policyagentprovider.log
12) Windows
Installer Source list update cycle: This action also very important while
installing MSI applications. This action causes the Product Source Update
Manager to complete a full update cycle. When you install an application using
Windows Installer, those Windows Installer applications try to return to the
path they were installed from when they need to install new components, repair
the application, or update the application. This location is called the Windows
Installer source location. Windows Installer Source Location Manager can
automatically search Configmgr 2012 distribution points for the source files,
even if the application was not originally installed from a distribution point.
Subscribe to:
Posts (Atom)