UI Automation for GoXam


#1

Hi,

It would be great if you could suggest any UI automation tool that would be best suited for GoXam ? Do you guys have any tool from your side for the same?

Thanks


#2

We have not implemented support for UIAutomation.

We started development of GoXam before there were any test frameworks for WPF (and also before the term “M-V-VM” was invented). So we had to create our own test framework. A simple test is defined via:

new Test("SimpleMove", this, SimpleMoveSetup, SimpleMoveRun, SimpleMoveCheck)

public void SimpleMoveSetup() {
  myDiagram.Model.NodesSource = new List<String>() { "A", "B", "C" };
}

public void SimpleMoveRun() {
  Node n = myDiagram.PartManager.FindNodeForData("A", myDiagram.Model);
  myDiagram.Panel.PerformGesture(GestureModifiers.None, Gesture.MouseLeftButton, Spot.Center.PointInRect(n.Bounds), new Point(200, 50), null);
}

public void SimpleMoveCheck() {
  Node n = myDiagram.PartManager.FindNodeForData("A", myDiagram.Model);
  Tester.Assert(Tester.Contains(n.Bounds, new Point(200, 50)), "node not moved to 200,50");
  Tester.Assert(myDiagram.SelectedNode == n, "didn't select moved node");
}

Note the use of the call to DiagramPanel.PerformGesture . However, many of our tests do not need to simulate any mouse input – they just look at the contents and consistency of objects in memory before and after some events.

I hope this helps you.