In Spain, tipping is entirely optional and it's not very common. You may see people leaving small change at cafés and bars and, eventually, someone tipping at a nice expensive restaurant. But most of the time, you won't see anyone other than tourists leaving a tip.