Testing is great fun, you should definitely go Its become a bit of a pilgrimage for me now, wouldn't miss it for anything!
I would recommend the 2nd test & especially the final 2 days as that is when the teams run through qualifying and race simulations, including pit-stops etc which are always good to watch. The first week is good if you want to be 1st to see the new cars but there is less running and quite a lot of aero runs with sensors etc and the teams are less likely to have the pit walls and pit stop equipment set up.
If you don't want to spend £250 per day for hospitality from the link chdphd posted above but still want some extra access than just the general admission areas and open grandstands (which is still fantastic viewing) then the circuit tours are pretty good which can be booked direct from the circuit website at 50euros (including circuit entry) as you get to visit the paddock, and get driven round the inner circuit road right next to the cars as well as access to the roof of the pits which is great! Or if you don't mind spending a 'bit' (OK a lot) extra then there are also team hospitality options where you get to visit the team garage, pitlane etc & have paddock access for the day, for much less cost than you would get over a race weekend and would be an unforgettable experience. (One day I will do this )
If you stay in Barcelona then it is really easy to get to the circuit on the train to Montmelo (takes about 30 mins) and then a taxi or just walk to the circuit. There are a couple of hotels right next to the circuit but I would be surprised if they are not all sold out at this stage. There are food stalls open but the choice is not great, and no alcohol is allowed in the circuit, either to buy or to take in. you can take your own food in (or you can go out the circuit at lunch & go to one of the nearby restaurants ).
There is nothing better to get rid of the winter blues and get ready for the new F1 season than a trip to testing - 8 hours of F1 cars (hopefully some decent weather) and a bit of a holiday in Barcelona - can not wait