The systematic emergence of drug resistance remains a major problem in the treatment of infectious diseases (antibiotics) and cancer (chemotherapy), with possible common fundamental origins linking bacterial antibiotic resistance and emergence of chemotherapy resistance. The common link may be evolution in a complex fitness landscape with connected small population niches. We report a detailed method for observing bacterial adaptive behavior in heterogeneous microfluidic environment designed to mimic the environmental heterogeneity found in natural microbial niches. First, the device is structured with multiple connected micro-chambers that allow the cell population to communicate and organize into smaller populations. Second, bacteria evolve within an antibiotic gradient generated throughout the micro-chambers that creates a wide range of fitness landscapes. High-resolution images of the adaptive response to the antibiotic stress are captured by epifluorescence microscopy at various levels of the bacterial organization for quantitative analysis. Thus, the experimental setup we have developed provides a powerful frame for visualizing evolution at work: bacterial movement, survival and death. It also presents a basis for exploring the rates at which drug resistance arises in bacteria and other biological contexts such as cancer.