Install
BugGrabber and BugSack to help with debugging. They work together.
You should be getting an error
Code:
local testFrame = CreateFrame("Frame", testFrame, UIParent)
is fine
Code:
local testFrame.texture = testFrame:CreateTexture()
is not fine. This second local is trying to create a new testFrame variable and .texture is trying to assume it is already a table (which it isn't).
Use:
Code:
testFrame.texture = testFrame:CreateTexture()
The first testFrame is a table (because frames are tables) so this should work.
That and
Code:
testFrame.texture:SetColorTexture(1,0,0,0.5)
SetTexture sets the texture file (name on disk) or file ID and WoW colours are 0 to 1. SetColorTexture creates a solid texture and colours it in one step.