Two of our papers have ben accepted at The 10th Malaysian Software Engineering Conference (MySEC2017) which will be held on August 7 – 9, 2017 at the Universiti Malaysia Terengganu, Malaysia.
More details will be shared soon.
Today I would like to discuss regarding script automation using Crontab. Let’s start first with what I meant by Script Automation?- Let’s say You want to run a script after every five minutes. How you can do that? Running the script after every five minutes manually? Well, that’s where script automation comes.
Now, it’s turn about Crontab. So for this, I would like to tell you to use Google!!!.
First, Write a script. A script that will measure the memory usage and if the memory usage is greater than a certain value then it’ll send an email.
So here is the script:
Let’s assume we have a config.ini file like below:
What we want to do is to read these value through a batch file. So let’s create a batch file named “test.bat” with following commands:
@echo off for /f "tokens=1,2 delims==" %%a in (config.ini) do ( if %%a==username set username=%%b if %%a==password set password=%%b ) echo %username% echo %password%
keep in mind that, the path of the config.ini file should be updated according to your file structure. In this case both of the files are at the same level.
JSONL or JSON Line is considered as newline-delimited JSON file where each line contains a single JSON encoded item. As of today (17/4/2017), the version of the latest json_lines package that is available for python is 0.2.0. which indicates that it is a new and much younger format. Today, I will only discuss on how to read a JSONL file in python. So if you want to know more about JSONL, then you can check here.
Exhaustive testing of all possible input is impossible in case of Data Driven Testing (DDT) as it is extremely difficult and time-consuming to do and not to mention almost impossible to find out all possible testing scenarios. To overcome this situation, we need to partition the class of all possible inputs to try to simulate exhaustive testing. This partitioning technique is known as equivalence partitioning where all possible inputs are divided into equivalence classes. A test with one member of an equivalence class will be the same as a test with all the members of that class. This article will try to explain Equivalence Partitioning through the example of “Hello World” application.