Quantcast
Channel: Silk Test Knowledge Base
Viewing all 105 articles
Browse latest View live

How do I apply the administrator password in SilkMeter?

$
0
0
Current Revision posted to Silk Test Knowledge Base by DaiG on 4/12/2016 3:45:14 PM

Passwords can only be set when applying a Grant against a licence within the SilkMeter Policy Administrator. To set the password purely for an administrator, set a Grant against the 'SilkmeterAdminAccess' licence. This will then ensure that all other users have User Mode access only.

To add the Administrator grant do the following:-

  1. Open the Policy Administrator, then select the 'SilkmeterAdminAccess' policy.

  2. If Policy Administrator is in User mode switch to Administrator mode.

  3. Click Edit, then click Edit Grants.

  4. On the Edit Grants dialog ensure that 'User' is selected in the 'Grantee' dropdown.

  5. Type 'Administrator' in the textfield to the right of the Grantee dropdown.

  6. Type the Administrator password in the User Password box, then re-type the password in the Confirm Password box.

  7. Ensure that there are no restrictions in the Date, Day and Hour fields.

  8. Click the arrow in the 'Unlimited Licenses' box to select unlimited licenses.

  9. Click the arrow in the 'Unlimited Usage' box to indicate unlimited usage

  10. Click Add Grant, then click OK to save your changes and exit the dialog.

Tags: password, admin, grant, administrator, SilkMeter

Internet Explorer 11 becomes non responsive during test execution

$
0
0
Revision 1 posted to Silk Test Knowledge Base by JohnLy on 4/14/2016 11:21:31 AM

A number of users have reported issues where IE (Internet Explorer) becomes un responsive/hangs during tests. Investigation by the Silk Test development team has found that this issue is potentially caused by a thread in IE being suspended which then creates a subsequent deadlock. The root cause of this problem is not a Silk Test specific issue but a problem which has been introduced with a new security feature in Internet Explorer. For further information please view this article.

This functionality was initially deployed to IE 11 on Windows 10, however it has since been ported to IE 11 on other platforms as well as IE 10.

As noted in the linked article, you can disable the feature by setting the mentioned registry key to the value 2 (MemGC will be disabled for any value less than 3). This setting which will  also fix the hang issue that can occur during test execution within Silk Test.

To resolve the issue, do the following:

Launch the Registry Editor

Go to: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main::OverrideMemoryProtectionSetting = %DwordValue%

Where %DwordValue% can be any of the following:

• 3: MemGC is enabled (default).
• 2: Memory Protector is enabled (force mark-and-reclaim).
• 1: Memory Protector is enabled.
• 0: MemGC and Memory Protector are disabled.

NB. If the OverrideMmemotyProtectionSetting value does not exist in the “Main” Key then you should create it and assign it with the decimal value 2.

This issue will be documented as a known limitation in the release of Silk Test 17.0

Tags: hang, non responsive, IE, crash, IE 11, Internet Explorer

How can SilkTest be used to retrieve the background colour of HtmlText objects?

$
0
0
Revision 3 posted to Silk Test Knowledge Base by JohnLy on 4/20/2016 10:22:54 AM

The ExecMethod() function runs a JavaScript method or property on an object within a webpage. This function can be used to retrieve the "backgroundColor" property of Html objects.

The example below illustrates how this can be used with an HtmlText object. It will print the background colour of the HtmlText object to the results file.

] Print(Browser.BrowserChild("SomeWebpage").HtmlText("SomeText").ExecMethod("currentStyle.backgroundColor"))

Old KB# 21526

While replaying a test I received the error “Not enough quota is available to process this command” how can I resolve this issue?

$
0
0
Current Revision posted to Silk Test Knowledge Base by chrislo on 5/13/2016 5:21:45 PM

The error message 'Not enough quota is available to process this command' is raised by the Operating System and can occur if the maximum quota has been reached for offline files. Can be seen when an application moves large files around to or from a redirected directory.

We can address this error message by increasing the allocated space for offline files. 

  1. Open up ‘Control Panel
  2. Navigate to Sync Center.
  3. Click on 'Manage Offline Files'. 
  4. Under the ‘Disk Usage’ tab, click 'Change Limits'. 
  5. Move the slider to increase space for offline files.
Tags: Silk Test, offline files, Not enough quota is available

When I record a new locator for an object map via the object map button ‘Record New Entry’ I receive the error “Unable to add new entry: Root node does not match”

$
0
0
Current Revision posted to Silk Test Knowledge Base by chrislo on 5/13/2016 5:23:36 PM

The error “Unable to add new entry: Root node does not match” is displayed when the root node for the pasted object does not match the root node in the object map.


Typically this issue can be seen in instances where an object being captured with the ‘Record New Entry’ button retains the full locator path and has not been edited to retain the hierarchy mode in the object map.

As an example if I manually record items into an object map against Notepad, you may see the below hierarchy:

If I now record a new entry for the ‘Save As’ dialog from Notepad by clicking the ‘Record new Entry’ button. The Identify object tool appears and I can select  the ‘SaveAs’ dialog by clicking on, the locator for the object is identified as ‘/Window[@caption='Untitled  - Notepad']//Dialog[@caption='Save As']’ as seen below:

If we were to click the paste button, we will be met with the error ‘Unable to add new entry: Root node does not match’. 

As a root node for the object map already exists as ‘/Window[@caption='Untitled - Notepad']’,  If the paste was successful we would have a combined locator of ‘/Window[@caption='Untitled - Notepad']/Window[@caption='Untitled  - Notepad']//Dialog[@caption='Save As']’

To resolve this issue we can edit the locator in the Identify Object tool by removing the parent locator /Window[@caption='Untitled - Notepad'] as this entry already exists in the object map.  The remaining locator in the identify object tool should now resemble the following //Dialog[@caption='Save As']


If we click paste in the identify object tool now we should now have successfully recorded a new entry in the object map, similar to below:

The object has now been successfully added to the object map and will be identified correctly in scripts that use the locator / item name.

 

Tags: root node, objectmap, Root node does not match, new entry

When I execute a test against Google Chrome I receive the following error: "Unrecoverable error occurred, automation support stopped working." How can I resolve this?

$
0
0
Current Revision posted to Silk Test Knowledge Base by chrislo on 5/13/2016 5:24:27 PM

If your are running the latest released version of Silk Test, you will be required to reinstall Google Chrome and the Silk Test extension to resolve the issue. To reinstall Google Chrome, please perform the following actions:-

1) If using Windows 7, Click the windows icon button on the task bar

2) Within the 'search programs and files' text field, Type 'appwiz.cpl' and press Enter.

3) Within the program list window , locate the 'search programs and files' text field and type 'Google Chrome'

4) Click 'Google Chrome' from the table

5) Click 'Uninstall'

6) Navigate to the following directories and delete the folders named 'Chrome'

i. C:\Users\<YourUserName>\AppData\Local\Google\Chrome

ii. C:\Program Files\Google\Chrome (On x86 machine) or

C:\Program Files(x86)\Google\Chrome (on x64 machine)

7) Google Chrome can be installed by navigating to the below link and clicking the 'Download Chrome' button :

https://www.google.com/intl/en/chrome/browser/desktop/

8) Once Chrome is reinstalled you will need to reinstall the Silk Test extension, navigate to the following link within the Chrome browser:-

chrome://extensions/

 

9) Check the 'Developer Mode' Check box

 

10) Click the 'Load unpacked extension' button

 

11) With the 'Browse For Folder' dialog open navigate to the below location:

C:\Program Files (x86)\Silk\SilkTest\ng\agent\plugins\com.borland.fastxd.techdomain.browser.agent_versionNumber

 

12) Click the 'ChromeJunctionExtension' folder followed by the 'OK' button

 

13) Ensure the Silk Test Chrome Extension is enabled as below.

Tags: silk test extension, install chrome, Silk Test, chrome, chrome extension

I have had to reinstall Fire Fox and the Silk Test plugin is no longer installed. How can I reinstall the Silk test plugin for Fire Fox?

$
0
0
Current Revision posted to Silk Test Knowledge Base by chrislo on 5/13/2016 5:26:38 PM

We can manually install the FireFox plugin by performing the following steps:-

1) Save any open files in Silk Test and then proceed to Close Silk Test

2) Stop the Open Agent if it is running.  The Open Agent can be found in system tray, identified as a green square with the characters ‘OA’.  Perform a right click on the icon a and select the menu option ‘Stop Agent’.

3) Open the FireFox browser

4) Open the FireFox menu and select 'Add-ons'

5) Locate the 'cog' button beside the 'Search all Add-ons' text field

6) Click the button and select 'install Add-on from file'

 

7) Navigate to C:\Program Files (x86)\Silk\SilkTest\ng\agent\plugins\com.borland.fastxd.techdomain.browser.agent_versionNumber\firefoxsilktestaddon and select the file 'silktestaddon.xpi'

 (Where * denotes remaining version number of Silk Test )

8) Click 'Open' from the 'Select Addon to install' dialog

 

9) On the software installation dialog click the 'Install’ button

 

10) Enable the FireFox extension

Tags: Fire fox, extension, reinstall, silktest

How can I get the value of a timer in a Visual Test? The only timer methods available are Start, Stop and Resume.

$
0
0
Current Revision posted to Silk Test Knowledge Base by chrislo on 5/13/2016 5:27:19 PM

While there are no specific methods available to retrieve the value of the timer, we can use the Silk Test Workbench reserved variable ‘st_LastReturnValue’ which will temporarily store the value of the timer immediately after the ‘Stop Timer’ test step.

The value of the timer will be returned as type ‘Long’ in milliseconds. 

The below steps provide details on how to create a variable and store the value of the timer in the variable.

1) Create a variable to store the value by navigating to Insert -> Variable -> Add Local

 

2) Enter a name for the variable and select 'long' from the type dropdown and click OK.

3) On the 'stop timer' step perform a right click and select  Insert -> Expression

 

4) In the Expression dialog, click the output dropdown box below the text 'Put the contents of the expression into' and select the variable created in step 2.

5) On the right hand side of the Expression dialog, click the dropdown below the text 'Select a variable local or reserved' and select the item 'st_LastReturnValue'.

6) Click the 'add' button below the dropdown box

 

7) Click 'OK' button

 

During the test when the timer is stopped the value of the variable you created will now be populated with the value of timer.

Tags: workbench, Timer, visual test, silktest

Restarting the Information Service on a Mac

$
0
0
Current Revision posted to Silk Test Knowledge Base by RobertM on 6/13/2016 3:08:14 PM

In those instances where the Information Service must be restarted on a Mac Remote Location, the following commands can be executed:

  1. Launch a terminal
  2. Execute the command:

    cd /Library/LaunchAgents

  3. To stop the Silk Test Information Service, execute the following command:

    launchctl unload com.borland.infoservice.plist

  4. To start the Silk Test Information Service, execute the following command:

    launchctl load com.borland.infoservice.plist

Tags: MAC, Silk Test, information service, infoservice, restart

Testing multiple iOS devices or simulators connected to a single Mac

$
0
0
Current Revision posted to Silk Test Knowledge Base by RobertM on 6/13/2016 3:08:28 PM

By default, Silk Test does not support testing multiple iOS devices/simulators that are connected to the same Mac. At any given time, any given user can only test on 1 iOS device/simulator that is connected to the Mac. It is possible to overcome this limitation to test multiple iOS devices/simulator by using multiple Mac user sessions and starting the Silk Test Information Service in each of these sessions.

To do this:

  1. For each iOS device or iOS Simulator, create a user with administrator privileges on the Mac. For example, to test on two iOS devices that are connected to the Mac and two iOS Simulators that are running on the Mac, you require four user sessions on the Mac with administrative privileges.

  2. For each user, install the Silk Test Information Service.

  3. For each user, navigate to the directory ~/.silk/silktest/conf/ and rename the file infoservice.properties.sample to infoservice.properties.

  4. For each user, edit the infoservice.properties file to specify a port that is not in use. The default port is 22901. Typically, you could increment the default port number by one for each user. For example, if you want to use four user sessions, use the ports 22901, 22902, 22903, and 22904.

  5. For each user, logout and login again with the same user to activate the information service with the specified port.

Tags: Simulator, concurrently, information service, devices, multiple, iOS

Testing Mobile Devices in parallel using Silk Test Classic

$
0
0
Revision 1 posted to Silk Test Knowledge Base by RobertM on 6/13/2016 3:08:47 PM

It is possible to test Mobile Devices in parallel with Silk Test 17.0. Silk Tests Open Agent currently has a 1:1 relationship for testing Mobile Devices, therefore you can only test 1 Mobile Device with 1 Open Agent. Therefore to achieve parallel device testing, you must have 2+ Open Agent instances available for testing the devices required.

The following code demonstrates a simple login-logout transaction against the Silk Test Mobile Insurance Demo app for iOS:

[ ]
[-] LoginLogout ()
     [ ] //Measure Mobile Transaction
     [ ] Handle hTimer = TimerCreate("Time Device")
     [ ] TimerStart(hTimer)
     [ ] Device.Email.SetText("john.smith@gmail.com")
     [ ] Device.Password.SetText("john")
     [ ] Device.Login.Click()
     [ ] Device.Menu.Click()
     [ ] Device.Logout.Click()
     [ ]
     [ ] //Stop the timer and print the value
     [ ] TimerStop(hTimer)
     [ ] print("{Device.GetProperty("deviceName")}={TimerValue(hTimer)}")
     [ ]
     [ ]
     [ ] //Release the device
     [ ] Device.CloseApp()
     [ ] Agent.DetachAll()
[ ]
[-] testcase parallelExample() appstate none
     [ ] DisconnectAll()
     [ ]
     [ ] //Agent and device info
     [-] List of List of ANYTYPE agents_devices = {...}
          [ ] {"localhost", "deviceName=iPad Mini;platformName=iOS;host=silkmac;app=C:\apps\InsuranceMobile.ipa"}
          [ ] {"machine2", "deviceName=Silk iPhone 5c;platformName=iOS;host=silkmac:22902;app=C:\apps\InsuranceMobile.ipa"}
          [ ] {"machine3", "deviceName=iPhone 6;platformName=iOS;platformVersion=9.3;isSimulator=true;host=silkmac:22903;app=C:\apps\InsuranceMobile.zip"}
     [ ]
     [ ] List of HANDLE hAgents
     [ ] List of ANYTYPE agent_device
     [ ]
     [ ] //Connect to Agent and Setup Mobile Device
     [-] for each agent_device in agents_devices
          [ ] ListAppend(hAgents, Connect(agent_device[1]))
          [ ] Device.sConnectionString = agent_device[2]
          [ ] Device.InvokeMobileBaseState()
     [ ]
     [ ] //Replay the test on the device
     [ ] HANDLE hAgent
     [-] for each hAgent in hAgents
          [-] spawn
               [ ] SetMachine(hAgent)
               [ ] LoginLogout()
     [ ] rendezvous

 

The full Silk Test Classic project can be downloaded below:

Parallel_DeviceTesting.zip

Tags: Android, mobile, parallel, Mobile Device, 4Test, mobile testing, iOS

Null Reference Exception when using ScrollIntoView method on WPFListViewItem

$
0
0
Current Revision posted to Silk Test Knowledge Base by JohnM on 8/9/2016 9:57:34 PM

Problem:

Why is the following error reported; when trying to call the ScrollIntoView method against a WPFListViewItem:

Resolution:

This error has previously been reported by customers using SilkTest to test WPF. Internal investigation has concluded that the error is related to the fact that WPFListBoxItems are virtualized by the parent WPFListView, and retrieved via the control's 'Items' property. The problem is that WPFListViewItems are eventually treated as 'disconnected' from their parent control; which is the technical reason for this Null Reference Exception.

Effectively there is nothing SilkTest can do to force the method to work, once a WPFListViewItem has become 'disconnected from its parent'.  However it is possible to workaround this issue; by instead calling ScrollIntoView() against the parent WPFListView, passing in the name of the Item as a parameter.

So instead of using the method like so:

Call ScrollIntoView against the parent WPFListView as follows:

Tags: wpf, Scroll, ScrollIntoView, Object Reference, silktest, ListView

How to automate two mobile android devices in one test.

$
0
0
Revision 1 posted to Silk Test Knowledge Base by Mark H on 10/11/2016 9:04:24 AM

In order to automate two android devices in one test please follow the instructions below (In this example I am using a Silk Test Workbench .net script):-


1. Add an application configuration for each device to your script properties section and browse to the application.apk you are testing:-

2. When attaching to a particular mobile device to perform an action you can use attribute "@deviceName".  This can be retrieved from the connection string in the application configuration for the said device:-

Note: You can also use an alternative attribute retrieved from the object spy tool (Eg - @DeviceID or @Model).


Please see example script below that automates a login to our sample Demo Insurance application.  Every action is performed on each device in turn:-

 

Imports SilkTest.Ntf.Mobile
Public Module Main
    Dim _desktop As Desktop = Agent.Desktop

    Public Sub Main()
    With _desktop.MobileDevice("/MobileDevice[@deviceName='HTC One M8s']") 'Perform action on my HTC Device
    .MobileObject("@resource-id='silktest.insurancemobile:id/email'").TypeKeys("john.smith@gmail.com")
    End With
    
    With _desktop.MobileDevice("/MobileDevice[@deviceName='Nexus 7']") 'Perform action on my Nexus 7 device
    .MobileObject("@resource-id='silktest.insurancemobile:id/email'").TypeKeys("john.smith@gmail.com")
    End With
    
    With _desktop.MobileDevice("/MobileDevice[@deviceName='HTC One M8s']")
    .MobileObject("@resource-id='silktest.insurancemobile:id/password'").TypeKeys("john")
    End With
    
    With _desktop.MobileDevice("/MobileDevice[@deviceName='Nexus 7']")
    .MobileObject("@resource-id='silktest.insurancemobile:id/password'").TypeKeys("john")
    End With
    
    With _desktop.MobileDevice("/MobileDevice[@deviceName='HTC One M8s']")
    .MobileObject("@resource-id='silktest.insurancemobile:id/log_in_button'").Click()
    End With
    
    With _desktop.MobileDevice("/MobileDevice[@deviceName='Nexus 7']")
    .MobileObject("@resource-id='silktest.insurancemobile:id/log_in_button'").Click()
    End With

    End Sub
End Module

Tags: android device devicename

Enable Silk4J Plugin menu options in an Eclipse Java Project

$
0
0
Revision 1 posted to Silk Test Knowledge Base by Mark H on 10/11/2016 9:07:22 AM

By default,  in a standard Java project, when you select the Silk4J plugin icon,  you will not have access to the Silk4J options such as Locator Spy, Object Maps, Keyword Driven Tests and Image/Verification assets (See below):-

To enable these options you will be required to add Silk4J compatibility.  See steps below:-
1. Right Click on your Java Project and choose Silk4J Tools | Make Silk4J project.

2. Close and reopen Eclipse.
3. You will now be able to see the Silk4J plugin options in your Java project (see below).

 

NOTE: You can disable this functionality again by right-clicking your project and choosing: Silk4J Tools | Remove Silk4J Compatibility.

Tags: silk4j plugin options locator spy object map image verification

Silk Test Workbench error when importing assets: "TCP Provider: An existing connection was forcibly closed by the remote host".

$
0
0
Revision 1 posted to Silk Test Knowledge Base by Mark H on 10/11/2016 9:11:00 AM

When attempting to import assets into your Silk Test Workbench SQL Server database, you may encounter the following exception:-


This will be followed by the following error:-

The above error you receive can be caused if the Silk Test Workbench client machine is connecting with an unsupported version of the SQL Server Native Client.  Please see Microsoft SQL Server Article below that fully explains this:-
https://technet.microsoft.com/en-us/library/ms187005%28v=sql.105%29.aspx


For example, if you are using SQL Server 2008 R2, please ensure you use SQL Server Native Client 10.0 (32bit) on the client machine when connecting to your database.

Tags: TCP Provider existing connection forcibly closed remote host sql server

How to determine if a Hybrid Application has met the Silk Test prerequisites for testing on Android?

$
0
0
Revision 1 posted to Silk Test Knowledge Base by JohnLy on 10/25/2016 2:46:48 PM

Prior to testing a Hybrid Application on Android using Silk Test you need to ensure that the follow prerequisites listed below have been met. Failure to meet these requisites will result in Silk Test being unable to recognise individual hybrid controls within your Android Application

  • Ensure that Java is installed on the machine on which Silk Test is running, and that the path to Java is added to the Path environment variable. Silk Test requires either a JRE or a JDK for mobile testing. If Java is not installed, add C:\Program Files (x86)\Silk\SilkTest\ng\jre\bin to the Path.

  • If you have created your own hybrid app by adding a web view to a native mobile app, add the following code to the app to make your app testable with Silk Test Classic:

           WebView.setWebContentsDebuggingEnabled(true);
           WebView.getSettings().setJavaScriptEnabled(true);


To ascertain if you have correctly met the above requisites particularly regarding enable JavaScript and WebContents debugging you can use the Google Chrome Development Tool.  To do this:

1) Enable USB debugging on your Android device

On your Android device, open up Settings, find the Developer options section, and enable USB debugging. If you're running Android 4.2 or later and you can't find Developer options you may need to enable it

2) Connect and discover your Android device

On your development machine, open Chrome. You should be logged in to one of your user profiles. Remote debugging does not work in incognito or guest mode.

Ensure that the Hybrid Application is opened on the device, then from Chrome “Open DevTools and select More tools > Inspect devices”

3) Debug content on Android device from development machine

From the Inspect Devices dialog, select your device from the menu on the left.

 

In the image below, you can see that the inspect tool is unable to inspect any Hybrid elements

 

Whilst in contrast the image below, shows that you the inspect tool is able to inspect Hybrid elements. Therefore validating that the application has met the perquisites listed in the Silk Test Help.

 

 

Tags: mobile, native, Silk Test, chrome, Debug, hybrid

How to perform a double click on an image in Silk Test Classic

$
0
0
Current Revision posted to Silk Test Knowledge Base by ColinM on 10/27/2016 10:12:07 AM

Currently in Silk Test Classic, you can only use basic data types when using Dynamic Invoke. With Silk4Net and Silk4J you can use more complex data types as they provide full Image Recognition support whereas Classic does not.

In Classic, only a subset of the Image Recognition methods are exposed and can be called.

If you wish to perform a double click using Image Recognition, you can use the below workaround. This will perform a single click against your saved image which will move the cursor on screen to that position.

Then using GetPosition() against the Cursor class, we can then use the x and y integer values in the DoubleClick() function.

The below example is tested against a sample on the W3Schools website.

[-] testcase ImageDoubleClick()
     [ ]
     [ ] String image = "D:\doubleclick.png"
     [ ]
     [-] if (WebBrowser.BrowserWindow.DynamicInvoke("ImageExistsFile", {image}))
          [ ]
          [ ] WebBrowser.BrowserWindow.DynamicInvoke("ImageClickFile", {image})
          [ ]
          [ ] POINT pCursor
          [ ] pCursor = Cursor.GetPosition()
          [ ]
          [ ] WebBrowser.DoubleClick(MB_LEFT, pCursor.x, pCursor.y)

Tags: Classic, DynamicInvoke, image recognition, Double Click, GetPosition, cursor

Failed to initialize the unit test extension 'urn:SilkTestClassAttribute' on Windows 10 in Silk4NET

$
0
0
Current Revision posted to Silk Test Knowledge Base by ColinM on 10/27/2016 10:12:27 AM

In Silk4NET, you may experience this issue after you have upgraded your Windows 7 OS to Windows 10 without performing a clean reformat. To resolve this issue, please follow the below steps:

1.        Close the Open Agent and Visual Studio

2.        Open the Windows Registry

3.        Look under the following key

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\*\Enterpris
eTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\TestTypeExtensions\SilkTestClassAttribute

4.        If this does not exist, can you check the below location to see if it exists:
 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\*\EnterpriseTools\QualityT
ools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\TestTypeExtensions\SilkTestClassAttribute
 
If this exists, create the registry from step 3 with the copied information from step 4. This will ensure that this registry information exists under Wow6432Node address. 

If you now run your Silk4NET scripts, this issue should no longer occur. 

Tags: initialize, Windows 10, Silk Test, Registry, Visual Studio, unit test extension, Silk4NET

Sys_Execute() of a batch file with a TIMEOUT does not run in invisible mode

$
0
0
Current Revision posted to Silk Test Knowledge Base by ColinM on 10/27/2016 10:12:32 AM

When attempting to execute a batch file which includes a TIMEOUT in invisible mode using the Sys_Execute() function, then the batch file will not run and Silk Test proceeds to the next step in the script. 

This is known limitation with using a TIMEOUT in a batch file and is not an issue caused by Silk Test.

When TIMEOUT is executed in a background batch script, it will result in "ERROR: Input redirection is not supported, exiting the process immediately.". The TIMEOUT command will run OK in a console or terminal session.

When TIMEOUT is executed, it tries to redirect the input. The command is waiting for the user to interrupt the wait period. This is not possible if the command is executed in the background(invisible mode). It does not have any possibility of retrieving input and fails immediately. This is as designed for the TIMEOUT command in Windows.

You can verify this by returning the output from the command line using Sys_Execute()

[ ] LIST OF STRING lsOutPut
     [ ]
     [ ] Sys_Execute("C:\cmd.bat", lsOutPut)
     [ ]
     [ ] print(lsOutPut)


This should return the error "ERROR: Input redirection is not supported, exiting the process immediately" in the Silk Test results. 

To workaround this will have to use "start" in your command line. Alternatively, if you are looking to use  TIMEOUT in a batch script to add a delay to your script, you can simply use a Sleep() call in your 4Test code instead to add a delay.

[ ] LIST OF STRING lsOutPut
     [ ] 
     [ ] Sys_Execute("start C:\cmd.bat", lsOutPut)
     [ ] 
     [ ] print(lsOutPut)

Tags: Silk Test Classic, 4Test, Silk Test, batch, timeout, sys_execute()

With Silk Test Classic Test Plans how can I stop a Test Plan from executing further if a test case fails?

$
0
0
Current Revision posted to Silk Test Knowledge Base by chrislo on 11/1/2016 9:34:58 AM

If your Silk Test Classic Test Plans consist of test cases that are dependent on the previous test case passing you may wish to stop the Test Plans from executing further if a test case fails.

We can achieve this by overwriting the DefaultTestCaseExit() statement by creating a TestCaseExit() method at the top of an include file.  When a testcase  encounters an error our method TestCaseExit() will be called. Within our TestCaseExit method we can use the command  @("$StopRunning") to terminate the execution of the remaining tests.

e.g.

     TestCaseExit (BOOLEAN bException)
         if (bException)
            @("$StopRunning")()
             ExceptLog()

Tags: Silk Test Classic, terminate, testplan, Exit, test, stop
Viewing all 105 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>