I want to make my frank test suite be able to login repeatedly. And I've found 'Resetting the app to first launch state' at http://www.testingwithfrank.com/user_steps.html :
Given /^I reset the (iphone|ipad) app$/ do |device|
steps "When I quit the simulator"
SDK = "4.3"
APPLICATIONS_DIR = "/Users/#{ENV['USER']}/Library/Application Support/iPhone Simulator/#{SDK}/Applications"
USERDEFAULTS_PLIST = "Library/Preferences/com.yourcompany.#{APPNAME}.dist.plist"
Dir.foreach(APPLICATIONS_DIR) do |item|
next if item == '.' or item == '..'
if File::exists?("#{APPLICATIONS_DIR}/#{item}/#{USERDEFAULTS_PLIST}")
FileUtils.rm "#{APPLICATIONS_DIR}/#{item}/#{USERDEFAULTS_PLIST}"
end
end
steps "Given I launch the #{device} app"
end
=.= I've changed the "SDK" to "7.1" , but it seems not work, and I got this error:
uninitialized constant APPNAME (NameError)
=.= I checked the directory - /Users/#{ENV['USER']}/Library/Application Support/iPhone Simulator/#{SDK}/Applications , but I can't find
the app I'm testing ... I'm using xcode6.2
can anyone help me to solve this problem? thanks! sorry I'm not good at English...