Challenge Overview
Project Overview
TopCoder and the TopCoder community have worked hard to get the platform to its currently level of maturity, but we're far from done. It's time to take the platform to the next level. TopCoder is going to start taking some steps to open up the platform API to the outside and community developers so they could incorporate it in their websites, applications or build their own applications (web, mobile or desktop).
The ultimate goal is to open up and build an "API" that is targeting all different type of audiences - Software and Studio Competitors, SRM/MM competitors, Copilots, Admins and TopCoder partners - each audience will have different interests and usages of the API, so it will be a huge project and we need to make sure that we are in the right direction from the beginning.
Competition Task Overview
We plan to develop automatic test suites for Topcoder Platform API.
This contest should develop a Test Framework to execute automatic tests, verify the response, insert / clean up the test data.
It's only used for testing and how to implement it is up to contestants. We don't have architecture for this.
- We will use JUnit 4 to execute the test cases and verify the result.
- The service end point and user key should be configurable in properties file.
- The test case should be configurable by JSON format.
- For example, test case developer could create a request json file and response json file. The test framework should convert the json file to http request and send to server and verify if the return response meet the expected respone.
- Test Case Verification
- It should verify the http response code and response body.
- Test Case Generate
- We want a test case generator in this contest. It should generate the junit test cases automaticlly based on the json file written by test suite developer.
- It should support tree view, for example
- the folder structure is
- contests/search_contest/1_list_all_active_contests_request.json
- contests/search_contest/1_list_all_active_contests_response.json
- The "all" test suite should include "contests" test suite (and others, e.g. "member_stats" test suites, "marathon" test suites)
- The "contests" test suite should include sub test suites like "search_contests", "review_opps"
- The "search_contests" will include some test cases. e.g. test_1_list_all_active_contests test method.
- the folder structure is
- Insert and Clean Test Data
- The test framework should provide helper methods to insert the test data. The test suite developer is not familiar with db schema. So the help methods need to be able to insert all necessary data for testing.
- This framework needs to define the data model for test suite developer for all platform apis. It only needs to insert the necessary test data for api call.
- for example, if developer want to insert a contest for testing, the developer should create a Contest entity (defined in the framework, only use for this project), set the contest name, contest id, etc. and then call a method addContest to create it. The test framework should create a contest in db.
- This framework needs to define the data model for test suite developer for all platform apis. It only needs to insert the necessary test data for api call.
- The test data clean is an easy task, just need to run a sql file to delete all records from database.
- The test framework should provide helper methods to insert the test data. The test suite developer is not familiar with db schema. So the help methods need to be able to insert all necessary data for testing.
Testing
The submission should include several sample configuration and test cases.
Technology Overview
- Java
- Informix
Documentation Provided
Current Platform API: https://dev.topcoder.com/docs
tc_refactoring_stage_1_contest_services: https://coder.topcoder.com/tcs/clients/cronos/components/tc_refactoring_stage_1_contest_services/trunk
tc_refactoring_stage_1_review_and_search_services: https://coder.topcoder.com/tcs/clients/cronos/components/tc_refactoring_stage_1_review_and_search_services/trunk
platform api: https://coder.topcoder.com/tcs/clients/cronos/applications/tc_platform_api/trunk
Final Submission Guidelines
Submission Deliverables:
- Soure Code
- Sample Test Cases
- Deployment Guide
- Any other files to use and verify the test framework.