Adding points to a single test now works perfectly. If points are added, xml output contains a tag <points>, if not, then the tag is omitted. The problem I had before was trying to strcpy rmsg's points to test result's points while test result's points was still null, and not enough memory was allocated for the string to be copied.