if { [catch {
    source tcl/test-procs.tcl

    # Test Execution START
        
    ::twt::log_section "Login the site wide admin"
    ::twt::user::login_site_wide_admin
    
    ::twt::log_section "Add the site wide admin to dotLRN"
    ::twt::dotlrn::add_site_wide_admin $server_url

    ::twt::log_section "Load I18N Messages and enter German locale"
    ::twt::acs_lang::load_i18n_messages    
    ::twt::acs_lang::set_locale de_DE
    
    ::twt::log_section "Upload users"
    ::twt::user::upload_users $server_url

    ::twt::log_section "Set up terms"
    ::twt::dotlrn::setup_terms $server_url
    
    ::twt::log_section "Set up departments"
    ::twt::dotlrn::setup_departments $server_url
    
    ::twt::log_section "Set up subjects"
    ::twt::dotlrn::setup_subjects $server_url
    
    ::twt::log_section "Set up classes"
    ::twt::dotlrn::setup_classes $server_url
    
    ::twt::log_section "Set up communities (i.e. Tennis Club etc.)"
    ::twt::dotlrn::setup_communities $server_url    
    
    ::twt::log_section "Add class members, i.e. professors, students and assistants"
    ::twt::class::setup_memberships $server_url
    
    ::twt::log_section "Add class subgroups"
    ::twt::class::setup_subgroups $server_url
    
    ::twt::log_section "Add class member applet"    
    ::twt::class::add_member_applets $server_url
    
    ::twt::log_section "Set up class forums - one per class"
    ::twt::forums::add_default_forums $server_url
    
    ::twt::log_section "Add forum postings"
    ::twt::forums::add_postings 
    
    ::twt::log_section "Add news items - one per class"
    ::twt::news::add_item_to_classes $server_url

    set student_email [::twt::user::get_random_users student 1]
    ::twt::log_section "Login as student $student_email"
    ::twt::user::login $student_email

    ::twt::log_section "Test customize layout page"
    ::twt::new_portal::test::customize_layout        

    ::twt::log_section "Test the manage memberships page"
    ::twt::dotlrn::test::manage_my_memberships

    #::twt::user::login_site_wide_admin            

    # Test Execution END

} result] } {
    global errorInfo

    # Output error stack trace and HTML response body
    ::twt::log $result
    ::twt::log "*** Tcl TRACE ***"
    ::twt::log $errorInfo
    ::twt::log "The response body is: [response body]"

    error "Test failed: $result"
}
