FitNesse for Appian is a tool for Automating Appian UI tests using a combination of FitNesse and Selenium.
Selenium and FitNesse provides an "easy" way to create user interface driven automated tests with Appian. Test cases can be used for functional testing and regression testing of the user interface and the process model functional logic.
The presentation Overview of FitNese for Appian contains more information about the tool as well as a demo video.
For additional API information, view the JavaDocs.
To use Selenium and FitNesse on your project, please follow the steps identified below for setting up the testing framework and creating/executing test cases.
We ask that whenever possible, you contribute back to the repository and the Appian PS community by
- adding any missing commands that you need to create for test cases
- fixing issues and defects
- implementing enhancements
As we work and contribute to make this tool better, we will take the greatest care to ensure that the next versions are backwards compatible. Rest assure that whatever changes are released in the future are NOT going to break your test cases.
If your team cannot directly enhance the framework, please make sure to contact the Appian CoE on Home or over email in order to provide your feedback.
We can help only if we know where the problems are!
- Firefox installed
- Java JDK installed and configured
- Configure JAVA_HOME environment variable to point to your JDK installation directory.
- Add %JAVA_HOME%\bin to PATH environment variable
- Download the newest release of AutomatedTesting.zip.
- Unzip contents of AutomatedTesting.zip into TESTING_HOME, e.g.
C:\AutomatedTesting. TESTING_HOME should not include spaces. - In a command prompt navigate to TESTING_HOME.
- Run
start.batto install and run FitNesse. Installation only takes 30 seconds.
- This will also start FitNesse, to stop type ctrl+C.
NOTE: if you choose a different location for TESTING_HOME than C:\AutomatedTesting, then you must update configs/custom.properties to refer to the correct location.
- Start FitNesse if it isn't already running:
- In a command prompt navigate to TESTING_HOME.
- Run
start.bat. - Navigate to
http://localhost:8980/LoginTest. - Click Edit to modify test and update the following variables:
- Update the APPIAN_URL, APPIAN_LOCALE (en_US or en_GB), and APPIAN_VERSION (7.10, 7.11, or 16.1)
- Update the Username REPLACE_USERNAME and Password REPLACE_PASSWORD'
- Click Save.
- Click Test.
- Open
TESTING_HOME\fitnesse.propertiesin a text editor. - Update FitNesseRootDir to refer to the repository containing the FitNesseRoot folder.
- Update FitNesseRoot to refer to the folder name containing the wikis.
- Next time you use
TESTING_HOME\start.batthe wikis will be pulled directly from the repo folders.
- Download Jenkins installer.
- Install Jenkins.
- Update
JENKINS_HOME\jenkins.xml--httpPortargument to another port, e.g. 8081. - Restart Jenkins service in Window services.
- In a browser, navigate to
http://localhost:8081. - Add relevant plugins (FitNesse and Git):
- Click on Manage Jenkins.
- Click on Manage Plugins.
- Click on Available tab.
- Filter by FitNesse check its box and click Download now and install after restart.
- Repeat, but filter by Git check its box and click Download now and install after restart.
- Once restarted, set up your GitHub credentials:
- Click on Credentials.
- Click on Global credentials.
- Click on Add Credentials and enter the following:
Kind: Username with password
Username: GitHub username
Password: GitHub password
Description: GitHub Credentials - Setup git.exe
- Click on Manage Jenkins.
- Click on Configure System.
- In the Git section, populate your Path to Git executable to the location of
git.exe. - Navigate back to the home page and click New Item.
- Choose a build name, select Freestyle project, and click OK.
- Setup SCM:
- Under Source Code Management click Git.
- Enter the Repository URL for your GitHub repository containing the fitnesse tests.
- For Credentials select your previously enter gihub credentials.
- Click Add build step and select Execute FitNesse test.
- Enter the following values:
- Select Start new FitNesse instance as part of build.
- Enter
TESTING_HOMEin Java working directory. - Enter
TESTING_HOME\lib\fitnesse-standalone.jarin Path to fitnesse.jar. - Enter the folder in your repository containing the FitNesse wikis in Path to FitNesseRoot, this can be subfolders.
- Enter
8981in Port for FitNesse instance. - Enter the page for the test or suite in Target Page.
- Check Is target a suite? if the page is a suite.
- Set HTTP Timeout and Test Timeout high enough that the tests will not timeout.
- Enter
fitnesse-results.xmlin Path to fitnesse xml results file. - Click Add post-build action and select Publish FitNesse results report.
- Enter
fitnesse-results.xmlin Path to FitNesse xml results file. - Click Save.
- You can now run your FitNesse test by clicking Build Now. This will download the newest version of the FitNesse tests from the GitHub repository and run them locally.
- Download Maven
- Configure
M2_HOMEenvironment variable to point to your Maven installation directory. - Add
%M2_HOME%\binto PATH environment variable - Add Git to PATH environment variable
- Clone the project repo to your local computer using
git clone git@github.com:appianps/ps-ext-FitNesseForAppian.git
- Setup the
M2_REPOvariable in Eclipse by running:mvn eclipse:configure-workspace -Declipse.workspace="<your-eclipse-workspace>".
- If you don't know your eclipse workspace, open your Eclipse preferences and go to General > Startup and Shutdown > Workspaces.
- Cleanup any existing Eclipse project files
mvn eclipse:clean - Generate new Eclipse project files by running the following from the root of the Labs repo working directory:
mvn eclipse:eclipse. - Open Eclipse
- Import the projects using File > Import > General > Existing Projects into Workspace.
- Select the repo folder and import the project.
All methods that are callable in FitNesse are derived from the appian-fixture-x.x.x.jar found in C:\AutomatedTesting\lib\appian. To create or modify an existing method, you must do the following:
- Modify class
com.appiancorp.ps.automatedtest.fixture.[BaseFixture|TempoFixture]to add new methods to the corresponding environment. - Most methods written for these classes will simply call methods of an object in the
com.appiancorp.ps.automatest.objectpackage, e.g.verifyNewsFeedContainingTextIsNotPresent(newsText)callsTempoNews.waitFor(newsText). - Make sure to annotate the class for javadocs generation.
- Add and test corresponding JUnit test cases in
\src\test\java\com\appiancorp\ps\automatedtest\fixture. - Update the public javadocs:
- Run Project > Generate Javadoc... and select the com.appiancorp.ps.automatedtest.fixture package (we don't need javadocs for the objects).
- Copy the resulting docs folder onto your desktop.
- Switch to the gh-pages branch of the repository.
- Delete the existing docs folder in this repository and replace it with the copied version.
- Commit and push.
- Follow the Local build procedures below to generate a new jar for testing.
- Copy new jar to
TESTING_HOME\lib\appian\and delete the existing version. - To push back to the remote repository:
- Create new branch for changes:
git branch BRANCH_NAMEthengit checkout BRANCH_NAME. - Publish new branch:
git push. - Create pull request back to master.
- Create new branch for changes:
- Update MAJOR version when you make incompatible API changes, e.g. removing methods, changing method names, or anything that would require updates to existing test cases.
- Update MINOR version when you add functionality in a backwards-compatible manner, e.g. adding new methods, updating drivers or jars.
- Update PATCH version when you make backwards-compatible bug fixes, e.g. fixing existing methods.
- Run
mvn verifyto run integration tests. - Run
mvn clean package(add-DskipTests=trueto skip unit tests). - Final JAR and Package are placed in the
/target/folder.
A new release can be prepared by completing the following steps:
- Run
mvn release:clean. - Run
mvn release:prepare -DpushChanges=falseadd-DdryRun=trueto perform the Maven release procedure without commiting changes to the local repository. Add-Darguments="-DskipTests"to skip integration tests.
This step will automatically do the following:
- Updates the pom.xml files with the release version number
- Commits the updated pom.xml files to the local git repository
- Runs all unit & integration tests and build the final packages
- Updates the pom.xml files with the next development version number
- Commits the updated pom.xml files to the local git repository
- Push generated commits to GitHub.
- Create new release on https://github.com/appianps/ps-ext-FitNesseForAppian/releases.
As mvn release:prepare only commits the updated pom.xml files locally, they need to be pushed to GitHub the same as any other commit.
The final release JAR's are placed in the /target/ folder of each module.
- Checkout master branch at new tag
git checkout COMMIT_HASH or TAG_NAME. - Run
mvn package - Upload new package to both the GitHub release and Share Component.