Technological Feasibility And Prototypes

I feel like I always see Prototypes go either way as far as established Technological Feasibility or not. When should I capitalize costs with respect to prototypes? What about costs while testing a prototype? Never? It seems unclear between questions.