by Ola Ajibode | Jun 9, 2020 | Automation, Bash, General, Shell
Docker has changed our world. A very useful component in the toolbox of any Software Engineer or perhaps, any forward-thinking company. What is Docker? Why Docker? and other questions relating to the topic starts here: Docker
Sometimes, you are just too annoyed with the state of your machine and need to stop all running containers, here is a simple command:
#stop all running docker containers
docker stop $(docker ps -a -q)
#remove all docker containers
docker rm $(docker ps -a -q)
Unfortunately, that’s still not enough for the lazy engineer, simply add this as an alias in your bash/zsh profile and then you can call that command in a consistent and easy manner.
#!/usr/bin sh
#I am either .bashrc or .zshrc or .bash_profile or whatever profile you use
alias docker_stop_all='docker stop $(docker ps -a -q)'
alias docker_remove_all='docker rm $(docker ps -a -q)'
Hope this helps.
by Ola Ajibode | Dec 12, 2018 | General
To ensure Jest ignores CSS files when running tests, simply follow the steps below:
- Install a module:
`identity-obj-proxy`
npm install -D
identity-obj-proxy
2. Update your jest config(jest.config.json)
{
"jest":{
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js",
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
},
}
}
Now run your tests again. You should not see failures due to CSS files anymore.
by Ola Ajibode | Sep 22, 2015 | Test Automation
Test Automation Guide
Having worked in various environments where test automation is a constant part of the processes and in some cases migration from manual testing to automated testing taking place, I am putting together a guide on how to introduce test automation as a reminder for myself and other testers or developer tester about to embark on such tasks. Here’s a snapshot of what I will be covering:
- How to assess your current state of test automation readiness
- How to develop a plan that will optimize test automation, people and processes
- How a data-driven, scriptless test technology can benefit any sized organization
- How to develop and maintain high levels of regression testing needed, using dynamic automated methods
- How to leverage the best mix of tools and methods to accelerate success
- How to quantify the value of automation for your business