From the course: Advanced Scripting for Testers: Local Data, Spreadsheets, and Reporting
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Capturing stdout and stderr
From the course: Advanced Scripting for Testers: Local Data, Spreadsheets, and Reporting
Capturing stdout and stderr
- [Instructor] There are two main types of programs that you can run on your computer. You're already probably pretty familiar with the first type, GUI or graphical user interface programs. We already saw how you can start a program like this from the terminal. However, when you do this with a GUI program, it will decouple itself from the terminal session that started it. This means that as a tester, we can't really do much more with it from a scripting perspective. We'll to look later in the course at how to create scripts that will allow us to do that. But first I want to look at the second type of program that you can run on your computer, and this is the command-line interface or CLI-based programs. Programs like this can of course be run from the terminal, but they also give the benefit of being able to tap into some of the standard outputs and errors that it provides. One of the important things that we want to do as a tester is to be able to see what's going on with a program…
Contents
-
-
-
(Locked)
Running command line programs5m 30s
-
(Locked)
Capturing stdout and stderr5m 45s
-
(Locked)
Running a program from Python2m 29s
-
(Locked)
Interacting with files6m 3s
-
(Locked)
Running a web server locally5m 22s
-
Parsing a log file7m 13s
-
(Locked)
Challenge: Find the error in the logs1m 4s
-
(Locked)
Solution: Find the error in the logs4m 13s
-
(Locked)
-
-
-
-