Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This document describes two simple ways to test Apache Fortress Rest services:
Follow the example in the Apache Fortress Quickstart testing guide:
These tests will use the Apache Fortress Core test programs to drive the Apache Fortress Rest services. It works via fortress core's inherent ability to call itself over REST, useful for testing and hopping over firewalls.
.-------'------. | FortressCore | '-------.------' | HTTPS .-------'------. | FortressRest | '-------.------' | in-process .-------'------. | FortressCore | '-------.------' | LDAPS .---------'-------. | DirectoryServer | '-----------------'
enable.mgr.impl.rest=true # This user account is added automatically during deployment of fortress-rest via -Dload.file=./src/main/resources/FortressRestServerPolicy.xml: http.user=demouser4 http.pw=password http.host=localhost http.port=8080 http.protocol=http
mvn install
mvn -Dtest=FortressJUnitTest test
mvn test -Pconsole
from FORTRESS_CORE_HOME:
mvn verify -Ploadtest -Dtype=...