mannu_77Occasional ContributorJoined 6 years ago7 Posts2 LikesLikes received1 SolutionView All Badges
ContributionsMost RecentMost LikesSolutionsRe: TC Service REST API - Is there a way to get TC instance ID of remote machine Dmitry_Nikolaev Yeah was looking around different options of reducing the size of the project for the execution purpose. Will check out SessionCreator also. Thanks. Re: TC Service REST API - Is there a way to get TC instance ID of remote machine Thanks for the reply Dmitry_Nikolaev why i posted this question is, as our code base exists in VM and we just need to open testcomplete and trigger test execution using REST API rather then again uploading project through Zip file. or Can we use other than http to upload zip file as time taken is too long to upload more than 1GB of Project suite. script: function UploadZIPFile() { Log.Message("Upload Zip file to the remote VM"); var address = "URL"; var username = "UName"; var password = "pwd"; var aqHttpRequest = aqHttp.CreatePostRequest(address, username, password); aqHttpRequest.SetHeader("Content-Type","application/zip"); var requestBody = ReadByteFromFile(); var aqHttpResponse = aqHttpRequest.Send(requestBody); if(aqHttpResponse.StatusCode == 200) { Project.Variables.InstanceID = aqHttpResponse.Text; Log.Message("File Upload to remote VM is successful and Instance ID is: " + aqHttpResponse.Text); CreateTestCompleteInstance(); } else { Log.Error("Error in uploading zip file to remote VM"); } Log.Message("End of Test"); } function ReadByteFromFile() { Log.Message("Read Byte from the zip file"); var Path = "C:\\Validation1.zip"; // Opens the specified file for reading var myFile = aqFile.OpenBinaryFile(Path, aqFile.faRead); Log.Message("File by bytes:"); // Reads bytes from the file and posts them to the test log while(! myFile.IsEndOfFile()) { s = myFile.ReadByte(); Log.Message(s); } // Writes the received array to the file myFile = aqFile.OpenBinaryFile(Path, aqFile.faWrite, true); result = myFile.WriteBytes(s); Log.Message("File reading and converted to binary"); // Closes the file myFile.Close(); Log.Message("End of Test"); return result; } This way time taken for execution is more. Is there any other way zip file can be uploaded? Thanks, Manu G TC Service REST API - Is there a way to get TC instance ID of remote machine Hi All, Is there a way to get the instance ID of TC/TE installed on Remote machine(VM) instead of uploading archive folder as project already exsists in the VM. Dont want to spend time on archiving and uploading the archive to VM(Skip zip and upload steps of Rest API). Get the instance ID and trigger the execution of tests by specifying the project path. Regards, Manu G SolvedRe: BDD Tests - Log messages are not getting generated Got the answer: Onstart Event function is written to have couple of Log statements which is overriding the log to be generated for steps performed for BDD test. need to override it or create a new project for BDD test. BDD Tests - Log messages are not getting generated Using TC 14 to write testcases using BDD tests. Written basic scenario and it is working fine. But in the log file no steps are being shown - attached screenshot of log file Below is the example of the test I have written. Let me know if i am missing something or some setting Feature File: Feature: Verify Text Message Scenario: Verify Home Page message is displayed Given The "Application" is launched When "Application" is visible on screen Then verify "Home Page" message displayed on screen Step definition: Given("The {arg} is launched", function (param1){ TestedApps.Application.Run(); Sleep(50); }); When("ICE {arg} is visible on screen", function (param1){ var retVal = aqObject.CheckProperty(MainWindow(),"VisibleOnScreen",cmpEqual,true); if(retVal) { Log.Message("Application is visible on screen") ; } else { Log.Error("Error in launching Application") ; } }); Then("verify {arg} message displayed on screen", function (param1){ var retVal = aqObject.CheckProperty(ExampleHomePageText(),"WPFControlText",cmpEqual,"Example Home Page"); if(retVal) { Log.Message("Verified Home Page text displayed on main window") ; } else { Log.Error("Error in verifying text") ; } }); AfterScenario(function (scenario){ Application.Close(); }); Thanks, Manu G SolvedRe: TestComplete Service REST API - Prepare your project suite step Thanks for the post. Looking into Curl as well as Postman to solve my problem TestComplete Service REST API - Prepare your project suite step Hi, I am trying to use REST API to trigger tests on Remote PC using TC service REST API feature. Enabled it executing the batch file. Getting "The specified data is not a valid ZIP file" message when I try to generate ID using POST/Suites through swagger in the 1st step of Prepare your project suite. Zip file structure image is attached. swagger image is also attached. Let me know where am I going wrong or am I missing any step. Even tried changing the folder structure mentioned in below link still the respone is failure. Following the below url https://support.smartbear.com/testcomplete/docs/reference/tc-service/api.html#project-requirements Thanks, Manu G Solved