Task-switching experiments are procedures often used in cognitive psychology. Subjects are typically asked to carry out a set of tasks, and performance times are measured.
A simple example of a task-switching experiment is asking subjects to press a computer key corresponding to either one of two colours flashing on a screen, as quickly as they can. In tests like this, differences in performance times can be measured when colours are alternated (task-switching), and are often attributed to executive attention needed in order to carry out the appropriate response.
Source:
Weaver SM, Arrington CM., “What’s on your mind: the influence of the contents of working memory on choice.” Q J Exp Psychol (Hove). 2010 Apr;63(4):726-37.
Example of a task-switching experiment: