Thursday, December 17, 2020

Requirements for Requirements

This text is not exactly mine. It is a very high-level abstract of what a book Requirements Engineering by Elizabeth Hull, Ken Jackson, Jeremy Dick, 2005 has to say on the subject of requirements for requirements.

So, how can we understand that your requirements are ok, or not ok? If they are another source of quality risks? To answer these questions, I've prepared some sets of criteria that we can use for assessment:
 

Sunday, March 29, 2020

Fix Invisible Drive for Linux Installer on Windows Notebook (ASUS VivoBook S14)

As it turns out it is not unusual to try to install Linux on a Windows notebook and notice that your installer (such as Unetbootin, for instance) can not locate any hard drive. The easiest way to fix it is to switch to legacy mode (Internet claims that legacy mode should be supported under any circumstances), but it is not always easy to find.

I got myself a new ASUS VivoBook S14 and there were no legacy option (it was in place on my old ACER Aspire V). I had to google around, try switching things on and off, and here is what changed things to the better:

-- get into BIOS menu (F2);
-- switch  to Advanced;
-- open SATA Configuration;
-- permanently switch it to AHCI.

This will make your hard drive visible and goodbye Windows.

My configuration:
ASUS VivoBook S14
Ubuntu 19.10 on Unetbootin USB stick
Temporary enabled boot with USB

Wednesday, February 26, 2020

Docker commands vs Docker life cycle - Basic level

Earlier I noticed that there's one problem with Docker support documentation. Unfortunately, while it is possible to find out the very basic scenarios in its Get Started section, you need to dig through the Internet for hours to find information about use cases. Use cases is an answer to the question "What are we trying to do here, anyway?".

So, I started to collect this information for myself and pair it with command sets. Below you can find a use case for setting up a docker image and performing some basic commands on it. I shall extend this collection later, if I'm lucky.

Tuesday, July 23, 2019

Troubleshooting Citrix Client for Linux and Fixing Mike Support

Sometimes you find yourself in one of those situations when nobody seems to have an easy solution, so you have to find one for yourself. For instance, you may need to connect to your VDI, and start your Skype meeting only to find that your microphone is disabled (in Skype, in Control Panel > Device manager).

And the answer is
to add AllowAudioInput=True
to the section [WFClient]
of wfclient.ini file
of your Citrix client configuration

So, here is how to fix it in slightly more detail:

Monday, July 15, 2019

Test Plan structure proven by several projects

Some time ago I wrote about the importance of using standards as a time saver. Since then I had a chance to apply this approach to several projects where I participated as a test expert.

So, below you can find a structure that helps to collect in one place all info you need to know about the state of test in a project. (I usually build a test plan as a single entry point for all the questions related to test by means of Atlassian Confluence, but I guess any other knowledge sharing system will do).

Also, I can guarantee that if you are able (have enough info, that is) to fill all the sections of my version of a test plan, then you do have your test process under control. So it can function as a checklist and and answer to a question where to start.

My version of a test plan consists of eight sections with subsections. Subsections may vary for each particular project, but I recommend sticking with the top-level ones.

IMPORTANT: Don't duplicate info, don't add info just to fill in sections, it is important that test plan is not just a formal piece of paper.

Saturday, June 29, 2019

Bash - Another thing for the lazy: umount by name

Hi, just another script. You won't believe how many errors you can get before this simple thing works. Sometimes I wonder if my brain does it just for kicks, to see what funny message we can get this time. Or maybe it is too lazy to bother with heuristics and just goes over all the imaginable options. Surprisingly, the second thing feels like an easier one.

Or maybe it does both: 

#!/bin/bash

if [ -z $1 ]
  then printf "\nPlease provide drive name (label)\n\n"
    exit
fi

drivelabel = $1

cat /etc/mtab | grep ${drivelabel} | cut -d " " -f1 | xargs umount

Friday, June 7, 2019

Bash - Bulk file update with find and sed

Doing bulk file update (mind escapes when using complicated patterns):

#!/bin/bash

if [ -z $1 ] || [ -z $2 ]  || [ -z $3 ] || [ -z $4 ]; then
        printf "\nPlease enter:\n
        1. file command-compatible filename pattern
        2. backup suffix for affected files
        3. pattern to replace
        4. replacement\n\n
        For instance, $0 *.txt .xml-backup blue red\n
        This should replace blue with red in all txt files\n\n"
        exit
fi


filename_pattern=$1
backup_suffix=$2
pattern_to_replace=$3
replace_with=$4

find . -type f -name ${filename_pattern} -exec sed -i${backup_suffix} "s|${pattern_to_replace}|$replace_with|g" {} \+

Bash - Cut a fragment of a log by some criteria (like timestamp)

Here is how to cut out a piece of a log between two unique strings (like timestamps):

#!/bin/bash

printf "\nResults are returned *inclusive*\n\n"

if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then
        printf "\nPlease enter SUBSTRSTART SUBSTREND and LOGPATH\nFor instance, $0 11:59:17,206 12:02:14,606 test.log\n\n"
        exit
fi

substrstart=$1
substrend=$2
logpath=$3

sed -n "/${substrstart}/,/${substrend}/p" ${logpath} | tee log_excerpt-$(date +%F_%H-%M-%S) | cat

Bash - Getting network data for the port (localhost only)

Getting network data:

#!/bin/bash

printf "\nCurrently for localhost only\n\n"

if [ -z $1 ]; then
    printf "Please enter port and [host]\n\n"
    exit
fi

port=$1
host=localhost

printf '========= lsof -i ============\n\n'

lsof -i :${port}

printf '========= netstat -lnt | grep $port ============\n\n'

netstat -lnt | grep ${port}

printf '========= nc -z $host $port  ============\n\n'

nc -z ${host} ${port}


Bash - kill everything with a matching name

Just a small script for killing matching processes by name:

#!/bin/bash

if [ -z $1 ]
then
    printf "keyword is empty\n\n"
    exit
fi

let k=0
let min=1

# mind the double brakets in do part
for i in $(ps -e | grep "$1"); do ((k++)); done

if [ "${k}" -lt "${min}" ]
then
    printf "no such process to kill\n\n"
    exit
fi


for i in $(ps -e | grep $1 | cut -s -f1 -d\t); do kill -9 ${i}; done