public static DataListFormat ExecuteTests(string serviceName, IDSFDataObject dataObject, DataListFormat formatter,
                                                  IPrincipal userPrinciple, Guid workspaceGuid, Dev2JsonSerializer serializer, ITestCatalog catalog, IResourceCatalog resourceCatalog, ref string executePayload)
        {
            if (dataObject.TestsResourceIds?.Any() ?? false)
            {
                formatter = dataObject.RunMultipleTestBatches(userPrinciple, workspaceGuid, serializer, formatter,
                                                              resourceCatalog, catalog, ref executePayload);
                dataObject.ResourceID = Guid.Empty;
            }
            else
            {
                var objArray = dataObject.RunSingleTestBatch(serviceName, userPrinciple, workspaceGuid, serializer, catalog,
                                                             ref formatter);

                executePayload = serializer.Serialize(objArray);
            }

            Dev2DataListDecisionHandler.Instance.RemoveEnvironment(dataObject.DataListID);
            dataObject.Environment = null;
            return(formatter);
        }