Giter VIP home page Giter VIP logo

robotframework-radius's Introduction

RadiusLibrary

https://travis-ci.org/deviousops/robotframework-radius.svg?branch=master

Introduction

RadiusLibrary is a test library for Robot Framework, providing keywords for handling the RADIUS protocol. The library supports the creation of RADIUS clients and servers, and supports authentication, accounting and change of authorization requests.

Installation

Using the PIP installer

$ pip install robotframework-radius

Or after cloning this repository

$ python setup.py install

Example

*** Settings ***
Library           RadiusLibrary

*** Test Cases ***
Should Receive Access Accept
    Create Client    auth    %{SERVER}    %{AUTHPORT}    %{SECRET}    %{DICTIONARY}
    Create Access Request
    Add Request attribute    User-Name    user
    Add Request attribute    User-Password    x
    Add Request attribute    Acct-Session-Id    1234
    Add Request attribute    NAS-IP-Address    127.0.1.1
    Send Request
    Receive Access Accept
    Response Should Contain Attribute    Framed-IP-Address    10.0.0.100
    Response Should Contain Attribute    Class    premium

Wrong Password Should Receive Access Reject
    Create Client    auth    %{SERVER}    %{AUTHPORT}    %{SECRET}    %{DICTIONARY}
    Create Access Request
    Add Request attribute    User-Name    user
    Add Request attribute    User-Password    wrong
    Add Request attribute    Acct-Session-Id    126
    Send Request
    Receive Access Reject
    Response Should Contain Attribute    Reply-Message    authentication failed

For more info, have a look at the keyword documentation: https://rawgit.com/deviousops/robotframework-radius/master/doc/RadiusLibrary.html.

Usage

Save the example above to auth.robot, execute the following commands.

$ export SERVER=127.0.0.1
$ export AUTHPORT=1812
$ export SECRET=secret
$ export DICTIONARY=/usr/share/freeradius/dictionary.rfc2865
$ robot auth.robot

Links

robotframework-radius's People

Contributors

deviousops avatar

Watchers

James Cloos avatar  avatar

Forkers

dirkm

robotframework-radius's Issues

Missing library

Hi
I have used this library with
OS: Linux and Windows
Python: 3.6 and 3.8
Robot Framework: 3.2.1

When I am invoke Add Request attribute keyword there is a low level error in Python for

NameError: name 'unicode' is not defined

Looking into code, I have seen below line

if isinstance(value, unicode):

Into this line is referenced an "unicode" label that it is not available into scope.

I have resolved importing from Robot Framework

from robot.utils.robottypes import unicode

I have made some test with various attribute and it seems work now.

Regards
Vincenzo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.