The Spanish and Hungarian Grand Prix venues have been chosen by the teams, subject to contracts being finalised.
Each test will take place on the Tuesday and Wednesday following the track's F1 race - on May 15-16 at Barcelona, and July 31-August 1 at the Hungaroring.
The sporting regulations allow for such tests, providing they take place at circuits where a grand prix has just taken place.
Hamilton cheered at Mercedes HQ, Bottas gets open-top car farewell
It is also a stipulation that each team must allocate two of the four days for young driver testing.
Bahrain GP venue Sakhir and the Hungaroring are hosting the tests this year, while Silverstone and Barcelona did so in 2016.
The running will be in addition to two pre-season tests, each lasting four days, which will take place at the teams' number one choice of testing venue Barcelona.
It is believed one team was pushing for a test at the Paul Ricard circuit, which will host next year's returning French GP, but the request did not gather sufficient support from rivals.
There will also be a series of days dedicated to tyre testing to allow supplier Pirelli to test improvements to the design of its tyres.
'Best season ever' - Button and Rosberg on F1 title fight between Hamilton and Verstappen
‘It has been the weirdest season’ - Button feels Hamilton and Verstappen both deserved title