Additional Features - CognizantOpenSource/Cognizant-Intelligent-Test-Scripter GitHub Wiki

Additional Features

How To Perform Exploratory Testing ?

Exploratory testing is an approach to software testing that is concisely described as simultaneous learning, test design and test execution. Cognizant Intelligent Test Scripter comes with an interface which has the options to Create/Record test cases, taking screen-shots and reporting the bugs to tools like JIRA/QCALM/ REDMINE etc.

Follow the steps below for performing exploratory testing.

  • Switch on the exploratory testing feature from the Cognizant Intelligent Test Scripter.

  • Perform the basic flow and take or crop the screen-shots wherever needed.

  • If needed the test steps can be recorded as well by switching on the record mode. Steps will be automatically added to the test steps sau

  • Recorded test steps can be saved as a test case and can be exported as a manual test case.

  • Using the report bug option , different details can be provided along with the attachments to the defect management tool.

  • For the details refer to the below screen-shot :

![](Additional Features\Img 1.PNG)

  • Following are the Settings:

    • Editor: Default editor for editing image

    • Argument: Editor supported arguments

    • Module: Modules for Reporting bugs(Currently integrated with JIRA)

    • URL: URL of the defect management tool

    • Username & Password: Username and password for the defect management tool

    • Project: Provide the project KEY as per your JIRA profile

![](Additional Features\Img 2.PNG)

  • To customize the fields given above use the Configure Fields option.

![](Additional Features\Img 3.PNG)

How To Add Angular js parameters to web objects?

This can be done by adding a new property to the Object property table under the Object repository in the design panel, the same can be done through options window as well, refer [Here](troubleshooting.html#adding-a-custom-attribute-toidentify- a-dynamic-object) for the process,

Refer to the AngularJS_Test test case in the Demo project present in the Projects folder (available in the installation location) for more information.

All the supported angular js properties are defined in the AngularFindBy class under the package, com.cognizant.cognizantits.engine.drivers.findObjectBy. Additional properties can be de􀂦ned in this class, the same way as the other properties.

How To Create a Standalone Report?

Standalone report, let's you to move the report folder to any location and still open your html report files, since the media folder is packed along with it.

Follow the steps below, to get a standalone report for your execution,

  • You can use the -standalone_report argument when the execution is done via command line

  • In order to enable this option from the App's UI, follow the steps below,

    • Navigate to Configuration->Options

    • Check the option Create Standalone Report, as shown in the image below,

    ![](Additional Features\Img 4.PNG)

  • Once this option is enabled, you will get a standalone report in the Latest folder and also in your Timestamp report folder, in the location \Results\TestDesign or TestExecution\Test scenario name orRelease name\TestCase or TestSet\Latest or Timestamp report folder

Note: When standalone report option is selected, both these folders (Latest folder and last executed time stamp) contain the same standalone report files. Hence either of them can be used.

Impact Analysis At Object, Flow And Test Data Level

If there are any changes in the object properties, reusable components or test data sheet, Cognizant Intelligent Test Scripter helps you generate a list of impacted test cases. User can quickly validate the change by running the impacted test cases.

How To Perform Impact Analysis?

Object Level

  • In the Object Repository, right-click the modi􀂦ed object and select the option Get Impacted TestCases.

![](Additional Features\Img 5.PNG)

  • In the Impacted TestCases dialog box, the list of impacted test cases will be shown. Select the required test cases and click Create as TestSet.

![](Additional Features\Img 6.PNG)

  • In the Execution panel, user can view the newly created test set under the release name. The test set will contain the selected test cases and reusables that have been impacted.

![](Additional Features\Img 7.PNG)

  • User can select the test cases and click the run button.

Flow Level

  • In the Reusable Components section, right-click the modified reusable and select the option ‘Get Impacted TestCases’.

![](Additional Features\Img 8.PNG)

  • User can create a new Test Set containing the impacted Test cases and run from the Execution Panel.

Test Data Level

  • In the Test Data section, right-click the modi􀂦ed data sheet and select the option ‘Get Impacted TestCases’.

![](Additional Features\Img 9.PNG)

  • User can follow the above steps for Test Data also.

RWD ,Parallel and Distributed Execution

How To Perform Parallel Execution?

  • Go to Test Execution Panel.

  • Pull your test cases in to the workspace of the execution panel.

  • Select various Browsers required.

![](Additional Features\Img 10.PNG)

  • Go to Configuration->Run Settings->Parallel Execution. Change the number of threads as per requirement using the up/down arrows.

![](Additional Features\Img 11.PNG)

  • Click on Save

  • Run Test Set

NOTE:

  • As we all know, Selenium has various limitations with IE. One of such limitations is that it struggles with multiple IEDriver instances. So, in Cognizant IntelligentTest Scripter, we have decided to restrict IE to just single thread in Parallel execution. For better understanding, refer the following example:

  • If user have six test cases in test suite, and distributed them equally between Chrome, Firefox and IE (two each).

  • In Run Con􀂦guration, you have given the thread count as 6.

  • Now, two threads will execute test cases for Chrome (2 ChromeDriver instances) and two threads will execute Test Cases for Firefox (2 Firefox instances) but for IE the execution will occur in a sequential manner even if we have two unassigned threads.

  • To read more about the issue please click here.

How To Perform Grid Execution?

Grid execution facilitates execution of test cases into multiple systems (Nodes) using a single system(Hub).

Note: You need to download Selenium Standalone Server

Configurations Made In The Hub Machine

  • Navigate to Configuration->Run Settings. Click the Grid radio button in the Run Settings tab and provide the Remote Grid URL.

  • For running test case in Grid Mode, navigate to Configuration->Start Server in the menu bar. Choose the port number, give the location of the selenium_standalone.jar and click on Start Server.

![](Additional Features\Img 12.PNG)

  • Go to the remote machine once the Hub machine is ready (Please Note : Both machines should be in the same sub net mask)

###Configurations Made In The Client Machine

  • Navigate to GridNode folder available in the installation location and copy the following JAR files to GridNode/lib (These files can be found in lib folder present in the installation location).

    • selenium-server-standalone.jar

    • IEDriverServer

    • chromedriver

    • gecko driver

  • Place all the above jar files in GridNode\lib

  • Nodes need to be configured with the Hub IP address and port number.Launch the GridNode UI by double clicking cognizant-intelligent-test-scripter-gridnode-*.jar which is inside the GridNode folder.

![](Additional Features\Img 13.PNG)

Note: If a mac machine is used as a Hub, then click on the start server from the UIand launch the StartGrid.command, that gets created in the installation location,once you click on start server from the UI. Double-click this 􀂦le to run the same. If you are not able to execute this file, you can change the permission of the file using the command below, sudo chmod -R 777 StartGrid.command This the method to launch the Selenium Hub for in mac for grid execution.

After setting the con􀂦gurations in the hub and client systems, you can run your test cases as test set from the execution panel, as shown in the image below,

![](Additional Features\Img 14.PNG)

How To Perform Cloud Based Execution With BrowserStack And Saucelabs?

This Document will help you to integrate Cognizant Intelligent Test Scripter with BrowserStack or Saucelabs

To execute your test Case in Saucelabs or Browserstacks please follow the following Steps

  • In test Execution panel create a testset.

  • In Browser 􀂦eld, select the browser of your choice.

  • Select the required Platform and BrowserVersion.

![](Additional Features\Img 15.PNG)

  • In the Cognizant Intelligent Test Scripter menu bar, click Configuration andselect Run Settings from the list of options. The Run Settings window is displayed.

  • In the Run Settings window, click the Run Settings tab.

  • In run settings choose Execution Mode as Grid

  • In the Remote Grid Url 􀂦eld, type the url that is provided by your service provider.

![](Additional Features\Img 16.PNG)

  • To save the settings made, click the Save button.

  • After saving the settings, execute the testset.

Note: Ensure that you are able to access the Saucelabs or BrowserStack URL in your network. And if there is any proxy used, the details of the same can be given here, navigate to Configuration->Browser configurations->General tab and click on the refresh button next to '+' button.

![](Additional Features\Img 17.PNG)

Fastest Customization in CITS 1.4 for easy integration

As part of Cognizant Fastest Customization, user has to enter following list of capabilities in CITS 1.1/1.2.

  • Username

  • Password

  • seleniumVersion

  • Packagename

  • triggerId

  • executionType

  • consoleSessionId

Please refer here for detailed steps.

From CITS 1.4 onwards, we had reduced the list of browser capabilities. Therefore, retain the following capabilities from Driver Settings dialog. Refer the below screenshot.

  • Username

  • Password

  • servicerequestid

  • seleniumversion

![](Additional Features\Img 18.PNG)

How To Modify The Cognizant Intelligent Test Scripter Engine To Change The Default Location Of The Results Folder?

When a test case or a test set is executed, the results will be generated and stored in the /Results/TestDesign or TestExecution/Scenario or Release/Testcase or Testset

This location can be changed to a user de􀂦ned one by following the steps below,

  • Open Cognizant Intelligent Test Scripter Engine Java project

  • Navigate to the AppResourcePath.java file available under the com.cognizant.cognizantits.engine.constants package.

public static String getResultsPath() {
return RunManager.getGlobalSettings().getProjectPath() +
File.separator + RESULTS_FOLDER;
}
  • In the above function, the required results path can be hard coded after the return keyword

Unable To Execute the scripts in iOS Browser?

After setting the per-requisites right, if you face the following exception in the log as shown in the picture below,

![](Additional Features\Img 19.PNG)

Try re installing libimobiledevice with HEAD, as explained in the link here.

How To Mail Reports/Status/Screen shots Automatically Post Execution?

In order to trigger mail automatically, post execution of your test cases, you can do the following steps,

  • Navigate to Configuration->Run Settings-> and switch to Mail Settings tab

  • Provide the necessary details as shown in the image below for a sample case,

![](Additional Features\Img 20.PNG)

  • Navigate to Configuration->Run Settings-> and check the Send Mail after Execution checkbox.

![](Additional Features\Img 21.PNG)

  • After saving the above options for test design or execution panel (test set), whenever you execute your test case, a mail trigger process to the speci􀂦ed To address will be initiated

Tip To send mail to multiple address,list the mails with ; separated in to.mail 􀂦eld. Ex:@gmail.com;[email protected];[email protected]

Note:

  • SMTP server is used to trigger the mail to the recipients. Please ensure that you are able to access the same in your system by the following command from command line,
telnet <SMTP host name> <port number>
  • Mail.smtp.starttls.enable – True. By making true, the communication with SMTP server login and tra􀂨c is encrypted

  • Mail.smtp.starttls.required – True. By making true, the SMTP server should have TLS con􀂦gured. If server do not have TLS con􀂦guration, the connection fails.

How To Run My Scripts In Edge Browser

In order to run your test cases in Edge browser, follow the steps below,

  • Navigate to /lib/Drivers

  • Download the driver from here https://developer.microsoft.com/enus/microsoft-edge/tools/webdriver/, and place the .exe in the above location

  • Restart Cognizant Intelligent Test Scripter and right click on the Run button to choose Edge browser and execute your scripts

  • Some Webdriver actions are still in the implementation phase in Edge driver and hence those commands can't be executed with Cognizant Intelligent Test Scripter as well

Note: For more information on the webdriver commands that are not supported in Edge driver, refer here https://docs.microsoft.com/en-us/microsoftedge/webdriver-commands

How To Run My Scripts In PhantomJs Headless Browser

Please follow the steps below in order to execute your scripts in PhantomJs,

  • Download the latest phantomjs driver from here http://phantomjs.org/download.html

  • Map the <PHANTOMJS_Installation_Folder_location>/bin path to PATH environment variable under System Variables

  • Right click the Run button in the Cognizant Intelligent Test Scripter UI and choose the browser PhantomJS to execute the scripts in same

How To Get PASS/FAIL Status For All The Actions?

For displaying the status of all the actions as either PASS or FAIL instead of DONE or DEBUG respectively, follow the steps below:

  • In the Cognizant Intelligent Test Scripter Engine, navigate to the file TestCaseReport.java present under the com.cognizant.cognizantits.engine.reporting package.

  • Go to the following method:

@Override
public void updateTestLog(String stepName, String stepDescription,
Status state, String optionalLink, List&lt;String&gt; optional)

and add the following code snippet (before the line "currentStatus=state;"):

state= state.equals(Status.DONE) || state.equals(Status.PASS)?
Status.PASS: Status.FAIL;
  • Export the Engine and restart the tool. Now, after the test case is executed the status of all the actions in the test case will be either PASS or FAIL

Adding Tags To Test Cases

  • You can add tags to the test cases in order to classify them based on their type. Once the tags have been added, you can use them in the execution Panel to filter the Test Cases.

  • To add a tag, select the Test Case and click the Edit Tag button. The Edit Tag window will open.

  • In the Edit tag window, enter the tag name and click the '+' button. The tag will now be added. If the tag is already present, select the tag. You can also assign more than one Tag to a test case.

![](Additional Features\Img 22.PNG)

  • If needed, repeat the above procedure for the other test cases.

  • Now, if you select a test case and click the Edit Tag button again, the tags that have been assigned to the test case will be shown.

![](Additional Features\Img 23.PNG)

  • In the execution panel, click the Filter Test Cases by Tag button and select the tags. Now, only the Test cases that have been assigned to the selected tags will be shown.

![](Additional Features\Img 24.PNG)

  • You can now group the Test Cases into Test Sets and run them.

![](Additional Features\Img 25.PNG)

Import External Data Sheets into Cognizant Intelligent Test Scripter

  • Go to TestData->Import TestData.

![](Additional Features\Img 26.PNG)

  • In the window, select the CSV 􀂦le that you wish to import and click Open.

![](Additional Features\Img 27.PNG)

  • The Test Data sheet can now be accessed from the UI.

![](Additional Features\Img 28.PNG)

Note: The Test Data Sheet to be imported must be in CSV format and must follow the same syntax as highlighted in the above image(refer the existing data sheets available in the installation directory under Projects/TestData).

How To Generate Excel Summary Reports With CITS?

  • Navigate to the Execution panel and go to Configuration>Run Settings and check the option for Excel Reporting

  • After saving the settings for the test set, execute the test set.The excel summary report for the execution will be saved in the Latest folder of the corresponding projects Results folder

Note: The SummaryExcelReport excel 􀂦le will open automatically if the environment supports Excel editor.

Note: Excel reporting needs to be enabled from execution panel.

⚠️ **GitHub.com Fallback** ⚠️