Testsuit Name Common UI Estimated run time 1 day Note for the test case looks like run test_common_*.php, they are AUTO test cases, http://fonightly.usa.hp.com:8080/job/2.0-Unit-Tests/ws/fossology/src/lib/php/tests/lib-php-Xunit.xml

common-active.php

run test_commo_active.php

Purpose confirm all the test cases for common-active.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_active.php in 2.0/fossology/src/lib/php/tests OK (1 test, 2 assertions)

make test to run all unit test cases for all common ui files

Note: this test will run all the unit tests for common ui files.

Purpose confirm all the unit test cases for common-active.php are passed
Dependencies >= PHPUnit 3.5.15
Step Action Expected Results
1. make install in ../src sysconf fils are installed in /usr/local/etc/fossology/
2. export SYSCONFDIR="/usr/local/etc/fossology/"
3. run make test in 2.0/fossology/src/lib/php/tests Time: 01:54, Memory: 5.25Mb OK (25 tests, 52 assertions)

common-agents.php

AgentCheckBoxMake()

AgentCheckBoxDo()

the functions above are tested in
Upload from file, file can be uploaded using Upload from url, etc

FindDependent() Obsolete

Note: this functions is still used in cli/cp2foss.php, this part of code also is Obsolete.

GetAgentKey()

AgentARSList()

LatestAgentpk()

CommonAgentCheck()

Purpose test functions above work
Dependencies install fossology successfully; start scheduler
Step Action Expected Results
1. Click on the top level "Upload" pull down menu & select "Upload from File" UI should display "Upload from File" page
2. supplying a valid file in local; select nomos and copyright in optional analysis multi-checkbox; click the "Upload!" button at the bottom of the page page should refresh with message at the top indicating a job has started to upload your request with a link to view the job status
3. click on the upload link for your job UI should display "Show Jobs" page with your requested upload & 4 jobs: ununpack & adj2nest, copyright, nomos
4. When all 4 jobs are completed, click the job # in the far left to view the log files for each verify all 4 jobs ran without any fatal errors
5. Return to the show jobs page and click on the upload name to browse UI should display your upload in the "Browse" page

AgentSelect()

FUTURE advanced interface allowing user to select dataset (agent version)

h2.userAgents()

This function is tested in addUserTest.php and dupUserTest.php.

common-auth.php

run test_common_auth.php

Purpose confirm all the test cases for common-auth.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_auth.php in 2.0/fossology/src/lib/php/tests OK (1 test, 2 assertions)

siteminder

Purpose Verify common-auth.php tested by Unit Test and Manual Test
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. Run phpunit test_common_auth.php in src/lib/php/tests OK
2. Edit /usr/local/etc/fossology/mods-enabled/www/ui/index.php, add 1 line "$_SERVER['HTTP_SMUNIVERSALID'] = "";" at the beginning;
3. visit the homepage of fossology UI User: has already logined; Click on the top level "Browse", will find xxxxxx sub directory is created under the top level folder

common-cache.php

run test_common_cache.php

Purpose confirm all the test cases for common-cache.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_cache.php in 2.0/fossology/src/lib/php/tests OK (3 tests, 3 assertions)

common-cli.php

run test_common_cli.php

Purpose confirm all the test cases for common-cli.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_cli.php in 2.0/fossology/src/lib/php/tests OK (1 test, 3 assertions)

common-buckets.php

SelectBucketDataset()

GetFileBuckets()

GetFileBuckets_string()

BucketInTree()

initBucketDefArray()

The functions above are tested in http://www.fossology.org/projects/fossology/wiki/Nomos_diff.

SelectBucketPool()

This function is test in http://www.fossology.org/projects/fossology/wiki/Bucket_Test_Cases#Multiple-bucketpools

#819, already fixed

common-compare.php

PickGarbage()

FuzzyCmp()

ApplicationPick()

MakeMaster()

FileList()

GetDiffLink()

NextUploadtree_pk()

FuzzyName()

CompareDir()

Dir2BrowseDiff()

The functions are tested in http://www.fossology.org/projects/fossology/wiki/Nomos_diff

common-db.php

DBconnect()

This function is tested in test_common_pkg.php

DBCheckResult()

GetSingleRec()

The functions above are tested in http://www.fossology.org/projects/fossology/wiki/Nomos_diff

DB2KeyValArray()

The functions is tested in http://www.fossology.org/projects/fossology/wiki/TaggingManualTests

DB_ColExists()

The functions is tested in http://www.fossology.org/projects/fossology/wiki/20-specific_Test_Suite#Source-Installs.

DB_TableExists()

The functions is tested in check agent

common-dir.php

run test_common_dir.php

Purpose confirm all the test cases for common-dir.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_dir.php in 2.0/fossology/src/lib/php/tests OK (2 tests, 9 assertions)

common-folders.php

FolderGetTop() DEPRECATED

This function is DEPRECATED, but still be used in ./www/ui/admin-folder-edit.php, ./src/cli/cp2foss.php, etc. FAILED

GetUserRootFolder()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Common_UI_Test_Cases#CommonAgentCheck,
when you go to the browse page.

GetRootFolder()

this functions is not used, for now default root folder name is hard code as"Software Repository". FAILED

Folder2Path()

GetFolderFromItem()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Nomos_diff
when you go to File Picker page

FolderListOption()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Cluster_Test_Cases#Upload-from-file when go to upload page.

FolderGetName()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Cluster_Test_Cases#Upload-from-server

FolderListScript()

FolderListDiv()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Common_UI_Test_Cases#CommonAgentCheck,
when you go to the browse page.

FolderGetFromUpload()

This function is DEPRECATED, but still be used in ./src/lib/php/common-compare.php, ../src/lib/php/common-dir.php. FAILED

FolderListUploads()

Purpose test FolderListUploads() through move upload
Dependencies fossology works fine
Step Action Expected Results
1. Click on the top level "Orgnize", pull down menu & select "Folders"-->"Create", enter the folder name as "test1" under Software Repository go to "Browse" page, will see the test1 folder under Software Repository
2. Click on the top level "Upload" pull down menu & select "Upload from File" under folder 'test1' UI should display "Upload from File" page
3. select one file from local, then click the "Upload!" button at the bottom of the page page should refresh with message at the top indicating a job has started to upload your request with a link to view the job status
4. click on the upload link for your job UI should display "Show Jobs" page
5. When all the jobs are completed, click the job # in the far left to view the log files for each verify all the jobs ran without any fatal errors
6. Return to the show jobs page and click on the upload name to browse UI should display your upload in the "Browse" page in test1 folder
7. Click on the top level "Orgnize", pull down menu & select "Folders"-->"Create", enter the folder name as "test2" under Software Repository go to "Browse" page, will see the test2 folder under Software Repository
8. Click on the top level "Orgnize", pull down menu & select "Folders"-->"Move", move the folder test1 to test2 under Software Repository go to "Browse" page, will see the test1 folder under folder test2

FolderListUploadsRecurse()

This function is not used, FAILED

GetFolderArray()

This function is tested by the test case: edit properties in http://www.fossology.org/projects/fossology/wiki/20-specific_Test_Suite#Basic-Fossology-functionality-based-on-the-top-menu-items

common-job.php

JobSetPriority()

This function is not used.

JobAddUpload()

JobAddJob()

JobFindKey()

JobQueueAdd()

The functions above are tested in http://www.fossology.org/projects/fossology/wiki/Cluster_Test_Cases#Upload-from-file

JobChangeStatus()

Purpose test JobChangeStatus() through check database
Dependencies fossology works fine
Step Action Expected Results
1. Click on the top level "Upload" pull down menu & select "Upload from URL" UI should display "Upload from URL" page
2. enter the url of the file, the file should more than 500M, then click the "Upload!" button at the bottom of the page page should refresh with message at the top indicating a job has started to upload your request with a link to view the job status, the status of wget_agent is Started
3. Click on the top level "Admin", pull down menu & select "Database"-->"Check" You will find some pfiles(Uploads missing pfiles) are inconsistent in inconsistencies table
4 Select the checkbox at the left of 'Uploads missing pfiles', click Fix! button at the bottom of the page On the top of this page, you will see some information looks like "DeletingUploads missing pfiles..."; Go to [Jobs]-->[My Recent Jobs] page, you will find the job log for this upload is missing.

JobQueueChangeStatus()

I have no idea how to test his functions, this function is used by ./src/ununpack/ui/ui-reunpack.php and ./utils/backup/fo-restore.php.
are these 2 php files still used in v2.0? FAILED

GetJobList()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Common_UI_Test_Cases#GetRunnableJobList

QueueUploadsOnAgents()

This function is tested by fossjobs in http://www.fossology.org/projects/fossology/wiki/20-specific_Test_Suite#Cli-Tests

common-license-file.php

run test_common_license_file.php

Purpose confirm all the test cases for common-license-file.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. SYSCONFDIR="/usr/local/etc/fossology/"
2. run phpunit test_common_license_file.php in 2.0/fossology/src/lib/php/tests Time: 01:17, Memory: 4.25Mb OK (5 tests, 6 assertions)

common-menu.php

run test_common_menu.php

Purpose confirm all the test cases for common-menu.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_menu.php in 2.0/fossology/src/lib/php/tests OK (4 tests, 9 assertions)

common-parm.php

run test_common_parm.php

Purpose confirm all the test cases for common-parm.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. run phpunit test_common_parm.php in 2.0/fossology/src/lib/php/tests OK (6 tests, 14 assertions)

common.php

This file will be tested by any manual ui test.

common-pkg.php

run test_common_pkg.php

Purpose confirm all the test cases for common-pkg.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. SYSCONFDIR="/usr/local/etc/fossology/"
2. run phpunit test_common_pkg.php in 2.0/fossology/src/lib/php/tests Time: 01:21, Memory: 8.00Mb OK (1 test, 1 assertion)

common-plugin.php

plugin_cmp()

plugin_sort()

plugin_init()

plugin_load()

plugin_install()

plugin_unload()

The functions above are tested in http://www.fossology.org/projects/fossology/wiki/Common_UI_Test_Cases#bootstrap

plugin_disable()

Purpose test plugin_disable() works
Dependencies install sucessfully and the scheduler is started
Step Action Expected Results
1. Go to [Admin]-->[Users]-->[Add] page, enter the user name is test_analyze, and set Access level as 'Analyze', then click on the button 'Add User' log out, then you can log in with user test_analyze sucessfully
2. Click on the top level "Upload" pull down menu & select "From File" UI should display "Upload a New File" page
3. supplying a file on your local system; click the "Upload" page should refresh with message at the top indicating a job has started to upload your request with a link to view the job status
4. click on the upload link for your job UI should display "Show Jobs" page with your requested upload & 2 jobs: ununpack & adj2nest
5. When all 2 jobs are completed, click the job # in the far left to view the log files for each verify all 2 jobs ran without any fatal errors
6. Return to the show jobs page and click on the upload name to browse UI should display your upload in the "Browse" page
7. Click on the top level "Orgnize" pull down menu & select "Uploads" No 'Delete uploaded file' submenu, only have 'Edit Properties' and 'Move' submenu

plugin_find_id()

plugin_find()

This function is tested in http://www.fossology.org/projects/fossology/wiki/Common_UI_Test_Cases#GetMimeType

plugin_find_any_id()

This function is tested by fossjobs in http://www.fossology.org/projects/fossology/wiki/20-specific_Test_Suite#Cli-Tests

plugin_find_any()

This function is not used.

common-repo.php

RepPathItem()

GetMimeType()

Purpose test GetMimeType() works
Dependencies install fossology sucessfully and the scheduler is started
tble{border:1px color:black}.
Step Action Expected Results
1. Click on the top level "Upload" pull down menu & select "From File" UI should display "Upload a New File" page
2. Complete steps 1-5 on the page, supplying a file on your local system; click the "Upload" page should refresh with message at the top indicating a job has started to upload your request with a link to view the job status
3. click on the upload link for your job UI should display "Show Jobs" page with your requested upload & 2 jobs: ununpack & adj2nest
4. When all 2 jobs are completed, click the job # in the far left to view the log files for each verify all 2 jobs ran without any fatal errors
5. Return to the show jobs page and click on the upload name to browse UI should display your upload in the "Browse" page
6. Click the link 'View'beside of the just uploaded file on the 'Browse' page Get the file content of the file you have already uploaded.

RepPath()

This function is only used by ./src/ununpack/ui/ui-reunpack.php, reununpack is still needed in v2.0? FAILED

common-scheduler.php

fo_scheduler_connect()

fo_scheduler_read()

fo_scheduler_write()

fo_scheduler_close()

fo_communicate_with_scheduler()

GetRunnableJobList()

Purpose test Scheduler Administration works
Dependencies install sucessfully and the scheduler is started
Step Action Expected Results
1. Go to [Admin]-->[Scheduler] page, Select an operation as 'status', Select the scheduler or a job as 'Scheduler', then click on 'Submmit' button On the top of this page, you will see the status of the Scheduer, it looks like 'Status of the scheduler successfully.scheduler:15642 revision:(null) daemon:0 jobs:1 log:/var/log/fossology/fossology.log port:24693 verbose:1 '
Note: if there are jobs running, the status of the Scheduer has the status of thosejobs, it looks like 'job:103 status:JOB_STARTED type:wget_agent, priority:0 running:1 finished:0 failed:0
job:107 status:JOB_STARTED type:ununpack, priority:0 running:1 finished:0 failed:0 '

common-sysconfig.php

run test_common_sysconfig.php

Purpose confirm all the test cases for common-sysconfig.php are passed
Dependencies >= PHPUnit 3.4.14
Step Action Expected Results
1. SYSCONFDIR="/usr/local/etc/fossology/"
2. run phpunit test_common_sysconfig.php in 2.0/fossology/src/lib/php/tests OK (1 test, 2 assertions)

common-tags.php

GetAllTags()

GetTaggingPerms()

Array2SingleSelectTag()

TagSelect()

TagFilter()

The functions above are tested in http://www.fossology.org/projects/fossology/wiki/TaggingManualTests

Common-uiphp

Array2SingleSelect()

GetArrayVal()

These functions are tested by the test case: edit properties in http://www.fossology.org/projects/fossology/wiki/20-specific_Test_Suite#Basic-Fossology-functionality-based-on-the-top-menu-items

Fatal()

GetFileExt()

These functions are tested in: http://www.fossology.org/projects/fossology/wiki/Nomos_diff.

debugbacktrace()

This function is tested by Fatal().

HumanSize()

This function didn't used by any php file.

DownloadFile()

Purpose Test the DownloadFile() function
Dependencies None
Step Action Expected Results
1. Login to the FOSSology UI and go to the "Browse" page, click the "Download" link of one upload file. Check the if the file download correctly in your local system.

bootstrap.php

bootstrap()

Purpose test bootstrap() work
Dependencies install fossology successfully
Step Action Expected Results
1. open the main page-welcome page(url is like: http://hostname/repo/) see the welcome page(if bootstrap() can not work, you will get one empty page)

libschema.php

ApplySchema()

GetSchema()

MakeFunctions()

The functions above are tested in http://www.fossology.org/projects/fossology/wiki/Common_UI_Test_Cases#bootstrap

ExportSchema()

Purpose test ExportSchema() work
Dependencies install fossology successfully
Step Action Expected Results
1. execue 'sudo schema-export -f schema-export-test get the export file schema-export-test
2. compare the schema-export-test with src/www/ui/core-schema.dat should got the same schema except the new 'ars' table and 'sysconfig' table