Showing posts with label Automation Team. Show all posts
Showing posts with label Automation Team. Show all posts

Tuesday, May 13, 2014

RAM_CPU_Internet Connection_Problem



So, I write this topic to share with you guys some problems we often faced with it when executing automation testing. All of them are my opinions, and it may not all right. So, I hope I will receive feedback from you to improve this topic.
Sometime, when I’m working with automation testing, my running machine often dyes or acts slowly. And those problems are caused my performance slowly. After researching, investigating and watching, I find out some of reasons as bellows:
       I.            RAM issues
a)      Caused
-          Application you have tested that have not good garbage collection in their code.
-          When command line/tools/application sends out a message that handled web actions (such as navigate to some urls) and threads that handled this message was stuck at queue, so they was timeout. At this time, another thread killed assigned browsers (timeout, killed by hand…), and then this message will be assigned to default browser. After many time of failure like that, the opened tabs will be uncountable => dump ram.
b)      Impact
-          Dump ram will make your automation test stop immediately. This means, if you forget to check status of running machine, you will receive no result.
c)      Possible solutions
-          Closed all programs unnecessary.
-          Take care of running status or machine status carefully.
    II.            CPU issues
a)      Caused
-          Too many programs/services run at the same time.
-          Remote desktop issue: you have to share some of your CPU resource for remote desktop.
-          Running machine is a virtual machine, means they will be affected by main PC’s performance.
b)      Impact
-          We will have to spend more time for running scripts on those machines.
-          Some time, it will cause deadlock.
c)      Possible solutions
-          Close all unnecessary applications/services.
-          Give virtual machine more resources.
-          After start jobs on remote machine, turn off your remote.
 III.            Internet connectivity issues
a)      Caused
-          One machine is given a limit bandwidth for network. This means, if this machine is remote to server, it will have to share some of its bandwidth for remote tasks.
-          With each program that request access to network (Such as youtube loading, torrent…), it will need some bandwidths. So, the bandwidth for this machine will be also reduced.
-          Some of antivirus (AV) software often cause and contribute to internet connectivity issues, especially when this program was not configured correctly. More than, when data transferred from server want to come to local, they have to go through a lot of AV Program’s shields.
b)      Impact
-          Some steps of test cases will be timeout.
-          Time for execute test cases will increased => reduce performance.
c)      Possible Solutions
-          Carefully choosing and configuring any anti-virus program you want to install.
-          Remove/stop any unnecessary application that directly uses bandwidth resources.
-          Increase timeout for each steps in test cases => this is a trade-off option.
-          After start jobs on remote machine, turn off your remote.


HoaLe

Monday, January 20, 2014

Task Scheduler



With Scheduled Tasks, you can schedule any script, program, or document to run at a time that is most convenient for you. Scheduled Tasks starts every time that you start Windows XP and runs in the background, and it starts each task that you schedule at the time that you specify when you create the task.

Using Scheduled Tasks

To schedule a new task:
1.       Open Windows Task Scheduler/Actions list/Create Basic Task…


    
2.       Fill expected information and click "Next" button





3.       Select days in week the Task should be started, after that clicking on “Next” button


 

4.       Fill the executed file path, after that clicking on “Next” button 




For example, with Checker Global – Run all test cases:
  - Program/script: C:\CheckerConsole.exe
  - Add arguments (optional): 1
  - Click Next

For example, with Link Common SLP – Run a specific test case:
  - Program/script: C:\LinkConsole.exe
  - Add arguments (optional): 2 range 571
  - Click Next


5.       Review configuration and click "Finish" button
 


6.       Some useful CLI commands:
   

ü_ Restart Windows: shutdown –r
ü  Delete file: del file_path
ü  Copy file: copy source_file_path des_file_path
ü  Push output to a logging file: command > log_file_name
ü  Push (append) output to a logging file: command >> log_file_name
ü  Print out screen: echo text_value (echo %time%)
ü  Comment out a line: start the line with “REM
ü  Etc…

Note:
ü  In a task scheduler item, we must provide the full file path (if any) in our executing scripts, something like this “Program/script: copy D:\LearnScript\ABC_Script.txt D:\LearnScript\Framework_Script.txt
ü  To start a scheduling task properly, the user who has created and owns that task must be active (has logged in her/his account) in advance. If the machine has rebooted and the user has never signed in before, the task won’t be able to execute.

Using Advanced Options in Scheduled Tasks
 
If you want to change the configuration of the task, click Open in the advanced properties for the task before you click Finish. After you click Finish, the Properties dialog box opens for the task.

On the Schedule tab, you can change any of the scheduling options that you chose in the wizard, and you can also change the task configuration so that the task does not run too long, does not run if the computer is running on batteries (for laptops), and to specify whether or not the computer should be idle for the task to run.

NOTE: You can open the Properties dialog box for the task at any time if you open Scheduled Tasks, right-click the task, and then click Properties.

You cannot schedule a task so that it repeats in an interval less than one day; however, you can do this in the Properties dialog box:
1.     Click the Schedule tab, and then click Advanced.
2.     Click to select the Repeat task check box, and then specify the number of minutes or hours in which you want the task to be repeated.
                                                              

                                                                                                      HoaLe