Abstract One of the most challenging issues for the semiconductor testing industry is how to deal with capacity planning and resource allocation simultaneously under demand and technology uncertainty. In addition, capacity planners require a tradeoff among the costs of resources with different processing technologies, while simultaneously considering resources to manufacture products. The need for exploring better solutions further increases the complexity of the problem. This study focuses on the decisions pertaining to (i) the simultaneous resource portfolio/investment and allocation plan accounting for the hedging tradeoff between the expected profit and risk, (ii) the most profitable orders from pending ones in each time bucket under demand and technology uncertainty, (iii) the algorithm to efficiently solve the stochastic and mixed integer programming problem. Due to the high computational complexity of the problem, this study develops a constraint-satisfaction based genetic algorithm, in conjunction with a chromosome-repair mechanism and sampling procedure, to resolve the above issues simultaneously. The experimental results indicate that the proposed mathematical model can accurately represent the resource portfolio planning problem of the semiconductor testing industry, and the solution algorithm can solve the problem efficiently.