This paper proposes a model for designing computer-based tests, useful in preparing for project management professional certifications. The tests are built taking into account learners' knowledge levels, their educational objectives and their behavior within the e-assessment session. The proposed model is an application of Particle Swarm Optimization to the educational domain. The model was validated by implementing it into an adaptive formative e-assessment system. The evaluation of the model is also provided, via a short controlled experiment and a questionnaire-based survey. The results are analyzed and positive conclusions are drawn regarding the impact of the innovative test building to the learning process itself.