X-Checker achieves this goal by serializing all objects that
are reachable from the variables that are in scope within the
source code of the app. Lines (9)-(11) in Figure 3 show the
objects being serialized and appended to a log. X-Checker
compares the logs produced by the Windows Phone and the
Android versions of the apps to identify inconsistencies. In
this example, serializing the Complex object simply prints
its value to the log. However, X-Checker’s serializer supports
arbitrary data types, and serializes them in a custom format.
The serializer itself is written in C#, with calls to the Windows
Phone SDK, and is included as a library within the native
app. As with all our test cases, we use Xamarin to produce
the Android version of the serialization library. Because XChecker’s
test cases include calls to the serializer in the source
code of the test case, we expect the serialized versions of
similar objects to also be similar on the Windows Phone and
Android versions.