Fix login tests

This commit is contained in:
Brendan Coles
2017-12-09 00:02:36 +00:00
parent 825b433084
commit 3ec6241c46
4 changed files with 18 additions and 14 deletions

View File

@@ -22,8 +22,8 @@ class BeefTest
session.visit(ATTACK_URL)
sleep 2.0
session.has_content?('BeEF Authentication')
session.fill_in 'user', :with => 'beef'
session.fill_in 'pass', :with => 'beef'
session.fill_in 'user', :with => BEEF_USER
session.fill_in 'pass', :with => BEEF_PASSWD
session.click_button('Login')
sleep 10.0

View File

@@ -13,7 +13,7 @@ VICTIM_URL = "http://" + VICTIM_DOMAIN + ":3000/demos/basic.html"
# Credentials
BEEF_USER = "beef"
BEEF_PASSWD = "beef"
BEEF_PASSWD = "test"
# RESTful API root endpoints
RESTAPI_HOOKS = "http://" + ATTACK_DOMAIN + ":3000/api/hooks"

View File

@@ -17,8 +17,8 @@ class TC_Login < Test::Unit::TestCase
sleep 2.0
BeefTest.save_screenshot(session)
session.should have_title('BeEF Authentication')
session.fill_in 'user', :with => 'beef'
session.fill_in 'pass', :with => 'beef'
session.fill_in 'user', :with => BEEF_USER
session.fill_in 'pass', :with => BEEF_PASSWD
BeefTest.save_screenshot(session)
session.click_button('Login')
sleep 10.0

View File

@@ -16,11 +16,13 @@ require './check_environment' # Basic log in and log out tests
require './tc_debug_modules' # RESTful API tests (as well as debug modules)
require './tc_login' # Basic log in and log out tests
require './tc_proxy' # Basic tests for Proxy extension
#require './tc_jools' # Basic tests for jools
require './tc_network_rest' # Basic tests for Network extension RESTful API interface
require './tc_dns_rest' # Basic tests for DNS RESTful API interface
require './tc_social_engineering_rest' # Basic tests for social engineering RESTful API interface
require './tc_webrtc_rest' # Basic tests for WebRTC extension
# Experimental extensions
#require './tc_jools' # Basic tests for jools
#require './tc_dns_rest' # Basic tests for DNS RESTful API interface
#require './tc_webrtc_rest' # Basic tests for WebRTC extension
#require './tc_social_engineering_rest' # Basic tests for social engineering RESTful API interface
class TS_BeefIntegrationTests
def self.suite
@@ -30,13 +32,15 @@ class TS_BeefIntegrationTests
suite << TC_Login.suite
suite << TC_DebugModules.suite
suite << TC_Proxy.suite
#suite << TC_Jools.suite
suite << TC_NetworkRest.suite
suite << TC_DnsRest.suite
suite << TC_SocialEngineeringRest.suite
suite << TC_WebRTCRest.suite
return suite
# Tests for experimental extensions
#suite << TC_SocialEngineeringRest.suite
#suite << TC_Jools.suite
#suite << TC_DnsRest.suite
#suite << TC_WebRTCRest.suite
suite
end
end