How can I obtain current browser in scripts?
I use TestComplete with BitBar to test web applications. My tests are scripted in javascript and I start remote browser like this: var capabilities = { "platform": "Windows", "osVersion": "11", "browserName": "Chrome", "version": "109", "resolution": "1920x1080" }; var server = "https://eu-desktop-hub.bitbar.com/wd/hub"; function StartInBitBar() { Browsers.RemoteItem(server, capabilities).Run(""); } function DoSomeTests() { //Here I need to obtain the Remote browser item created in StartInBitBar(), but how? //This fails: Log.Message(Browsers.CurrentBrowser.Description); }584Views0likes1CommentZephyr - Schedule Automation Testing Capability
Zephyr has the ability to execute Automation Test Runs using TestComplete or TestExecute. This is a useful platform to control test runs and import results into Zephyr. However the Vortex option on Zephyr feels a little under developed. It would be nice to have this developed further to allow the scheuling of test runs. For example:- - Run test 1 - Every Monday at 2am - Run Test 2 - On the 2nd of every money at 2am - Also include a Automation Test Run Execution list of all the jobs scheduled and a log of those executed. Is it possible to include this feature?418Views2likes0CommentsTestComplete with Zephyr Scale
In this post, we are going to talk about SmartBear’s UI testing tool, TestComplete, and writing the results to Zephyr Scale in an automated fashion. When we think about using TestComplete with any test management tool, it can really be accomplished in two ways: Natively inside TestComplete or integrating with some CI-CD system. When we are using Zephyr Scale, both ways will utilize the Zephyr Scale REST API. When we link to Zephyr Scale natively from TestComplete, it is a script heavy approach. An example of that can be found here. Today we are going to go into detail about using TestComplete, with a CI-CD system, and sending the results to Zephyr Scale. Now let’s talk about automating this process. The most common way to automate triggering TestComplete tests is through one if its many integrations. TestComplete can integrate to any CI-CD system as it has Command Line options, REST API options, and many native integrations like Azure Dev Ops or Jenkins. The use of a CI-CD system makes managing the executions at scale much easier. The general approach to this workflow would be a two-stage pipeline something like: node { stage('Run UI Tests') { // Run the UI Tests using TestComplete stage('Pass Results') { //Pass Results to Zephyr Scale } } First, we trigger TestComplete to execute our tests somewhere. This could be a local machine or a cloud computer, anywhere, and we store the test results in a relative location. Next, we use a batch file (or alike) to take the results from that relative location, send them to Zephyr Scale. When executing TestComplete tests, there are easy ways to write the results to a specific location in an automated fashion. We will look at options through the CLI as well as what some of the native integrations offer. Starting with the TestComplete CLI, the /ExportSummary:File_Name flag will generate a summary report for the test runs, and save it to a fully qualified or relative path in Junit-XML structure. At a basic level we need this: TestComplete.exe <ProjectSuite Location> [optional-arguments] So something like this: TestComplete.exe "C:\Work\My Projects\MySuite.pjs" /r /ExportSummary:C:\Reports\Results.xml /e The /ExportSummary flag can be stored in a relative or fully qualified directory. We could also use one of TestComplete’s many native integrations, like Jenkins and specify in the settings where to output results: Now that our TestComplete tests are executing, and the results are writing to a relative location we are ready for stage 2 of the pipeline, sending the results to Zephyr Scale. So now let’s send our results to Zephyr Scale. I think the easiest option is to use the Zephyr Scale API, and the Auto-Create Test Case option to true. The command below is a replica of what you would use in a batch file script in the pipeline. curl -H "Authorization: Bearer Zephyr-Scale-Token-Here" -F file= Relative-Location-of-Report-Here\report.xml;type=application/xml "https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey=Project-Key-Here&autoCreateTestCases=true" After you modify the API token, relative location, and project key you are good to run the pipeline. The pipeline should look something like this: After we run the pipeline let’s jump into Jira to find to confirm the results are populating. Even with execution data: Also, with transactional data to analyze the failed test steps:1.4KViews0likes0CommentsBitBar Execution - Maximize browser window irrelevant or browser selected
We are using Test Complete to execute our tests on bitbar. we use Edge ,Chrome and Safari as our browsers under test. The question is : using TestComplete, how do we send the maximize browser call and have it work across all the browsers used for testing in BitBar Cloud? We have tried: Aliases.browser.BrowserWindow.Maximize() => this works locally but not on BitBar. Any suggestions to try out?453Views0likes0CommentsTestComplet 14 - support for dotNET Functions
We just migrated to TC14 from TC10 and we are having this weird problem: we are trying to hold the test from running while the application is in a non-responsive state, we are using this code: var affinityPtr = dotNET.System.IntPtr.zctor(intAffinity); var process = dotNET.System_Diagnostics.Process.GetProcessById(intProcessID); process.ProcessorAffinity = affinityPtr; When we are executing the dotNET line(red color), we get an exception - "Object doesn't support this property or method" check value ofProcessorAffinity: Error: System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.get_ProcessorAffinity() Please help me resolve this issue. Thanks to all helpers, TuanSolved1KViews0likes3CommentsUpgrade to TC 14 problems with Connect being null (Windows 10)
We had a VS/TC test running (Visual Studio 11 and TC 12) which worked fine. I do a Connect.StopTest() to stop a test before doing the StartTest(). I surround the StopTest() with a try{} catch{} in case no test is running. We recently updated to TC14. Rebuilt everything and replaced those 3 Automated dll's with the TC14 ones.(when we first ran TC 14 it converted our project noted by "tpath" above to tc14): Occasionally, the test works, but most of the time at the lines Connect.StopTest() andConnect.RunTest(GetTestName(), "Generic", tpath); we get the following below (when we first ran TC 14 it converted our project noted by "tpath" above to tc14): Result Message: Initialization method ErepriceClassLibrary.NewReprice.Before threw exception. System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.. Result StackTrace: at Multiplan.Scripts.WorkFlow.BaseClasses.AbstractTestCase.Before() in c:\VS_Projects\ERepricerTC14\EERepriceFrameworkClassLibrary\BaseClass\AbstractTestCase.cs:line 89 When I do a quickwatch on Connect it certainly is not null (see attached picture). Originally the StopTest() was in the Before() method but I moved it to the line before I start the test as I thought that would fix it. I can't understand why it says Connect is null. Anyone have an idea? See attached picture.Solved1.2KViews0likes5CommentsTest script gets stuck while looking for an object when script run via Network suite
I have used the waitProcess method to identify the process and perform some actions once the process is identified. Sys.WaitProcess("JWSMenu",5000) When I run this script on local , it works as expected. If the process does not show within the mentioned timeout returns an empty stub object and the next line of code is executed. But When I run the same test script via network suite in distributing test environment, Test complete keeps on looking for the process object for infinite time and test gets stuck at this line code..696Views0likes0Comments