Whole sediment toxicity tests play an important role in environmental risk assessment of organic chemicals. It is not clear, however, to what extent changing microbial community composition and associated functions affect sediment test results. We assessed the development of bacterial communities in artificial sediment during a 28 day bioaccumulation test with polychlorinated biphenyls, chlorpyrifos and four marine benthic invertebrates. DGGE and 454-pyrosequencing of PCR-amplified 16S rRNA genes were used to characterise bacterial community composition. Abundance of total bacteria and selected genes encoding enzymes involved in important microbially-mediated ecosystem functions were measured by qPCR. Community composition and diversity responded most to the time course of the experiment, whereas organic matter (OM) content showed a low but significant effect on community composition, biodiversity and two functional genes tested. Moreover, OM content had a higher influence on bacterial community composition than invertebrate species. Medium OM content led to the highest gene abundance and is preferred for standard testing. Our results also indicated that a pre-equilibration period is essential for growth and stabilization of the bacterial community. The observed changes in microbial community composition and functional gene abundance may imply actual changes in such functions during tests, with consequences for exposure and toxicity assessment.