qacafe - ip test solutions
Knowledge Base > How do I add my custom test cases to BuddyWeb?

How do I add my custom test cases to BuddyWeb?

BuddyWeb

To include a custom testpath for BuddyWeb included with CDRouter 5.0 and up, simply view the Preferences page and add the new testpath. The BuddyWeb service will require a restart after adding a testpath.

Adding a custom Custom Testpath

Please see this Knolwedge Base article if you encounter an issue with your custom testpath.

For BuddyWeb included with releases through CDRouter 4.3

With version 3.8 through 4.3 of CDRouter, customized modules and test cases can be incorporated directly into BuddyWeb. This functionality allows new customer-specific modules to be easily viewed, selected, and executed alongside standard CDRouter modules within the BuddyWeb environment. There are three primary methods for adding custom modules and test cases to BuddyWeb. Note that only one of the methods described below should be used on your system to avoid potential issues with multiple user-defined testpaths.

Method 1

The preferred method is to create a file in the /usr/buddyweb/etc/ directory named 'user-testpath'. This file is a white-space separated list of paths automatically included in the -testpath option when BuddyWeb is started. Multiple test paths can be added one per line, or spaced out on the same line. Modules that are found in any of the test paths listed in the 'user-testpath' file will automatically be added to list of CDRouter tests.

# cd /usr/buddyweb/etc
# pico user-testpath

Method 2

The second way that custom test cases can be added to BuddyWeb is to use the -testpath option when launching BuddyWeb. This will take the existing CDRouter tests and add the modules located in the test path to the list.

# cd /etc/init.d/buddyweb stop
# /usr/bin/buddyweb -testpath /myTestPath/

Method 3 (CDRouter 4.3 or newer)

The third way to add your custom test cases to CDRouter is to update the BUDDY_TESTPATH environment variable for the root user. This environment variable should contain a list of all test paths, starting with CDRouter's default test path.

# export BUDDY_TESTPATH="/usr/share/doc/cdrouter/ /myTestPath/"

Note that the BUDDY_TESTPATH environment variable can be cleared by setting it equal to an empty string.

# export BUDDY_TESTPATH="/usr/share/doc/cdrouter/ /myTestPath/"

Additional Information

For more information on creating customized test modules and test cases, please refer to our Test Suite Developer's Guide, which can be downloaded from our Customer Lounge.

If you have problems adding your customized modules or test cases to BuddyWeb, please contact support@qacafe.com.

Related articles that may also be helpful: