This paper deals with the optimal designing of step-stress accelerated life test (SSALT) for two stress variables. The lifetime of the items follows the Gompertz distribution and the test is subject to termination at a predetermined number of failures of test items (Type II censoring). Furthermore, we model the effects of changing stress as a cumulative exposure (CE) function. This test is presented to obtain the optimal hold times for each combination of stress levels. The optimal test plan with the minimum asymptotic variance (AV) of the maximum likelihood estimator (MLE) of reliability at time [Formula: see text] is determined. Due to nonlinearity and complexity of the objective function, the particle swarm optimization (PSO) algorithm is developed to calculate the optimal hold times. In this method, the research speed is very fast and optimization ability is more. Finally, simulation results are discussed to illustrate the proposed criteria. For some selected values of the parameters, the effect of initial estimates on optimal values has been studied.