.. _c-api-testprogs: ============= Test Programs ============= :Author: Stefan Eletzhofer :Date: |today| Abstract ======== In order to test the functionality, and also to demo the library features, we provide several *test programs*. They're listed here for reference. .. warning:: All the examples below need a Windchill system with **nexiles|gateway** and the **nexiles|gateway file service** extension installed. Test Account ------------ To aid testing w/o the need to roll-out on the customer's server, we have created a test account on our Windchill system: **Windchill base URL** http://skynet.solunor.com:1080/Windchill **user name** `siemens` **password** `SiemensDemo` The account has access to one product container `Siemens TDSM Test`. For testing convenience, there's also a existing business object with the number `0000000663`. Test Program: nxfs_example_upload.c =================================== Purpose ------- Show the steps needed to **upload** a file to a Windchill business object. Building -------- The provided make file contains a `test` target, which will build the program. Usage ----- To use the example, you need to specify the Windchill base URL and your credentials. For testing, we've created a account on our Windchill system: So -- using the nexiles Windchill server -- the test program needs to be called with:: $ ./nxfs_example_upload http://skynet.solunor.com:1080/Windchill siemens SiemensDemo 0000000663 <> Where `<>` is the name of a file to upload. The file should then visible in Windchill. Source Code ----------- .. literalinclude:: ../../src/c-api/nxfs_example_upload.c :language: c :linenos: Test Program: test_nxfs.c ========================= Purpose ------- Test every feature of the **nexiles|gateway C-API** available. Building -------- The provided make file contains a `test` target, which will build the program. Usage ----- Just start the executable. Optionally, you can provide a log file name:: $ test_nxfs test.log If no log file name is given, the log is written to *stdout*. Source Code ----------- .. literalinclude:: ../../src/c-api/test_nxfs.c :language: c :linenos: .. vim: set ft=rst tw=75 nocin nosi ai sw=4 ts=4 spell expandtab: