function testMenu(originalBGImage)
	testMenuItems={}
	testMenuItems[1]="exit"
	testMenuItems[2]="return"
	testMenuItems[3]="testinputs"
	testMenuItems[4]="drawplayersremovecard"
	testMenuItems[5]="testtimer"
	testMenuItems[6]="gametest"
	testMenuItems[7]="reloadproperties"
	testMenuItems[8]="testfilesystem"
	testMenuItems[9]="testloadproperties"
	testMenuItems[10]="multiTests"
	
	local nbOptions=tableLength(testMenuItems)
	local currentSelection=1
	local x=138+10
	local y=10
	local bg=Image.createEmpty(480,272)
	bg:clear(Color.new(50,75,150,150))
	
	
	while true do
		screen:blit(0, 0, originalBGImage, true)
		screen:blit(0, 0, bg, true)
		updateInputs(Controls.read())
		
		if inputFirstPress("down") or inputIsRepeating("down") then
			currentSelection=math.mod(currentSelection, nbOptions)+1
		elseif inputFirstPress("up") or inputIsRepeating("up") then
			currentSelection=currentSelection-1
			if currentSelection==0 then
				currentSelection=nbOptions
			end
		end
		
		if inputFirstPress("r") then
			currentSelection=nbOptions
		end
		if inputFirstPress("l") then
			currentSelection=1
		end
		
		--selection of an item
		if inputFirstPress("cross") then
			if currentSelection==1 then
				if yesNoMenu(originalBGImage, "Are you sure\nyou want to exit?\n\n\n       O: yes  sq: no")=="yes" then
					return "exit"
				end
			elseif currentSelection==2 then
				return "quitMenu"
			else
				--tests
				dofile("scripts/tests/"..testMenuItems[currentSelection]..".lua")
			end
		end
		
		if inputFirstPress("square") then --cancel/return
			return "quitMenu"
		end
		
		
		
		local i=0
		for i=1,nbOptions do
			if i==currentSelection then
				screen:blit(0, y-6+(i-1)*15, menuImages["main_selector"], true)
			end
			screen:print(x, y+(i-1)*15, testMenuItems[i], white)
		end
		
		screen.waitVblankStart()
		screen.flip()
	end
end