Porosity is a core parameter in the evaluation of shale oil reservoirs. The accuracy of its measurement is constrained by two main issues: the lack of standardized pretreatment procedures (solvent extraction and drying) and an unclear error propagation mechanism resulting from the selection of different volume parameters (bulk volume Vb, grain volume Vg, and pore volume Vp). To systematically analyze the influencing factors on porosity test results and establish a high-precision testing method, this study selected 8 sets of 16 core samples from Jurassic shale oil reservoirs in the Sichuan Basin. Comparative porosity experiments were conducted using differentiated pretreatment workflows (with/without solvent extraction, gradient temperature/duration drying) and measurements of different volume parameters (Vb, Vg, Vp), with reference materials introduced to optimize the measurement method. The results show that: (1) Solvent extraction significantly releases pore space, with an average absolute increase in porosity of 0.32%, particularly more pronounced in low-maturity samples (Ro<1.2%), where the increase reached up to 0.56%; (2) Drying temperatures exceeding 105℃ lead to the removal of interlayer water in clay minerals and a systematic reduction in pore volume (average decrease of 4.2%), while drying at 90-105℃ for 24-36 hours is identified as the optimal parameter balancing efficient dehydration and structural preservation; (3) Among volume parameter measurements, the error in Vb measurement is the primary source of porosity data dispersion (its error is on average 3.8 times that of Vp error); (4) The optimized direct measurement method (measuring Vp and Vg) significantly enhances the repeatability and accuracy of porosity results (with a 76.8% reduction in repeatability error). The study concludes that solvent extraction pretreatment is essential prior to porosity testing in shale oil reservoirs (especially for low-maturity samples); strict control of drying temperature (≤105℃) is critical for obtaining accurate pore volume; and the optimized method (direct measurement of Vp and Vg) effectively addresses error propagation in volume measurement, enabling high-precision porosity testing.