Skip to content

Instantly share code, notes, and snippets.

@svpernova09
Created December 11, 2019 23:46
Show Gist options
  • Save svpernova09/d0a94023a5ab4e1378dbfccbc2b14312 to your computer and use it in GitHub Desktop.
Save svpernova09/d0a94023a5ab4e1378dbfccbc2b14312 to your computer and use it in GitHub Desktop.
Snip-it Test results running locally
└─(1)─ ./vendor/bin/codecept run api
Codeception PHP Testing Framework v2.3.6
Powered by PHPUnit 6.4.4 by Sebastian Bergmann and contributors.
Api Tests (54) --------------------------------------------------------------------------------------------------------------------------------------------------------------------
✔ ApiAccessoriesCest: Get a list of accessories (0.14s)
✔ ApiAccessoriesCest: Create a new accessory (0.12s)
✔ ApiAccessoriesCest: Update an accessory with patch (0.12s)
✔ ApiAccessoriesCest: Delete an accessory (0.11s)
✔ ApiAssetsCest: Get a list of assets (0.06s)
✔ ApiAssetsCest: Create a new asset (0.10s)
✔ ApiAssetsCest: Update an asset with patch (0.13s)
✔ ApiAssetsCest: Delete an asset (0.12s)
✔ ApiCategoriesCest: Get a list of categories (0.04s)
✔ ApiCategoriesCest: Create a new category (0.08s)
✔ ApiCategoriesCest: Update an category with patch (0.11s)
✔ ApiCategoriesCest: Delete an category (0.11s)
✔ ApiCheckoutAssetsCest: Check out an asset to a user (0.17s)
✔ ApiCheckoutAssetsCest: Check out an asset to an asset (0.12s)
✔ ApiCheckoutAssetsCest: Check out an asset to an asset (0.12s)
✔ ApiCheckoutAssetsCest: Checkin an asset that is currently checked out (0.06s)
✔ ApiCompaniesCest: Get a list of companies (0.06s)
✔ ApiCompaniesCest: Create a new company (0.09s)
✔ ApiCompaniesCest: Update an company with patch (0.11s)
✔ ApiCompaniesCest: Delete an company (0.11s)
✔ ApiComponentsCest: Get a list of components (0.04s)
✔ ApiComponentsCest: Create a new component (0.09s)
✔ ApiComponentsCest: Update an component with patch (0.12s)
✔ ApiComponentsCest: Delete an component (0.11s)
✔ ApiConsumablesCest: Get a list of consumables (0.03s)
✔ ApiConsumablesCest: Create a new consumable (0.10s)
✔ ApiConsumablesCest: Update an consumable with patch (0.12s)
✔ ApiConsumablesCest: Delete an consumable (0.11s)
✔ ApiLicensesCest: Get a list of licenses (0.04s)
✔ ApiLicensesCest: Create a new license (0.09s)
✔ ApiLicensesCest: Update a license with patch (0.13s)
✔ ApiLicensesCest: Ensure a license with seats checked out cannot be deleted (0.09s)
✔ ApiLicensesCest: Delete an license (0.11s)
✔ ApiLocationsCest: Get a list of locations (0.05s)
✔ ApiLocationsCest: Create a new location (0.08s)
✔ ApiLocationsCest: Update an location with patch (0.12s)
✔ ApiLocationsCest: Delete an location (0.10s)
✔ ApiManufacturersCest: Get a list of manufacturers (0.03s)
✔ ApiManufacturersCest: Create a new manufacturer (0.09s)
✔ ApiManufacturersCest: Update an manufacturer with patch (0.11s)
✔ ApiManufacturersCest: Delete an manufacturer (0.11s)
✔ ApiAssetModelsCest: Get a list of assetmodels (0.04s)
✔ ApiAssetModelsCest: Create a new assetmodel (0.08s)
✔ ApiAssetModelsCest: Update an assetmodel with patch (0.12s)
✔ ApiAssetModelsCest: Delete an assetmodel (0.11s)
✔ ApiStatuslabelsCest: Get a list of statuslabels (0.03s)
✔ ApiStatuslabelsCest: Create a new statuslabel (0.09s)
✔ ApiStatuslabelsCest: Update an statuslabel with patch (0.11s)
✔ ApiStatuslabelsCest: Delete an statuslabel (0.11s)
✔ ApiUsersCest: Get a list of users (0.05s)
✔ ApiUsersCest: Create a new user (0.08s)
✔ ApiUsersCest: Update an user with patch (0.17s)
✔ ApiUsersCest: Delete an user (0.11s)
✔ ApiUsersCest: Fetch assets for a user (0.17s)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 6.72 seconds, Memory: 152.25MB
OK (54 tests, 392 assertions)
└── ./vendor/bin/codecept run unit
Codeception PHP Testing Framework v2.3.6
Powered by PHPUnit 6.4.4 by Sebastian Bergmann and contributors.
Unit Tests (117) ------------------------------------------------------------------------------------------------------------------------------------------------------------------
✔ AccessoryTest: Fails empty validation (0.64s)
✔ AccessoryTest: Fails min validation (0.34s)
✔ AccessoryTest: Category id must exist (0.37s)
✔ AccessoryTest: An accessory belongs to a company (0.34s)
✔ AccessoryTest: An accessory has a location (0.34s)
✔ AccessoryTest: An accessory belongs to a category (0.34s)
✔ AccessoryTest: An accessory has a manufacturer (0.34s)
✔ AssetMaintenanceTest: It_zeros_out_warranty_if_blank (0.35s)
✔ AssetMaintenanceTest: It_sets_costs_appropriately (0.35s)
✔ AssetMaintenanceTest: It_nulls_out_notes_if_blank (0.34s)
✔ AssetMaintenanceTest: It_nulls_out_completion_date_if_blank_or_invalid (0.34s)
✔ AssetModelTest: An asset model requires attributes (0.34s)
✔ AssetModelTest: An asset model zeros out blank eols (0.34s)
✔ AssetModelTest: An asset model contains assets (0.36s)
✔ AssetModelTest: An asset model has a category (0.35s)
✔ AssetModelTest: An asset model has a depreciation (0.34s)
✔ AssetModelTest: An asset model has a manufacturer (0.36s)
✔ AssetTest: Fails empty validation (0.36s)
✔ AssetTest: Auto increment mixed (0.36s)
✔ AssetTest: Auto increment mixed full tag number (0.39s)
✔ AssetTest: Warranty expires attribute (0.37s)
✔ AssetTest: Model id must exist (0.35s)
✔ AssetTest: An asset has relationships (0.38s)
✔ AssetTest: An asset can be available for checkout (0.39s)
✔ AssetTest: An asset can have components (0.38s)
✔ AssetTest: An asset can have uploads (0.37s)
✔ AssetTest: An asset can be checked out (0.56s)
✔ AssetTest: An asset has maintenances (0.36s)
✔ CategoryTest: Fails empty validation (0.35s)
✔ CategoryTest: A category can have assets (0.41s)
✔ CategoryTest: A category can have accessories (0.35s)
✔ CategoryTest: A category can have consumables (0.35s)
✔ CategoryTest: A category can have components (0.39s)
✔ CompanyTest: Fails empty validation (0.36s)
✔ CompanyTest: A company can have users (0.35s)
✔ CompanyTest: A company can have assets (0.36s)
✔ CompanyTest: A company can have licenses (0.37s)
✔ CompanyTest: A company can have accessories (0.35s)
✔ CompanyTest: A company can have consumables (0.36s)
✔ CompanyTest: A company can have components (0.36s)
✔ ConsumableTest: Fails empty validation (0.38s)
✔ ConsumableTest: A consumable has relationships (0.38s)
✔ CustomFieldTest: Constructor (0.36s)
✔ CustomFieldTest: Format (0.37s)
✔ CustomFieldTest: Db name ascii (0.36s)
✔ CustomFieldTest: Db name latin (0.38s)
✔ CustomFieldTest: Db name chinese (0.45s)
✔ CustomFieldTest: Db name japanese (0.37s)
✔ CustomFieldTest: Db name korean (0.39s)
✔ CustomFieldTest: Db name non latin euro (0.38s)
✔ CustomFieldTest: Db name turkish (0.36s)
✔ CustomFieldTest: Db name arabic (0.37s)
✔ DepreciationTest: Fails empty validation (0.38s)
✔ DepreciationTest: A depreciation has models (0.42s)
✔ DepreciationTest: A depreciation has licenses (0.38s)
✔ ImporterTest: Default import asset with custom fields (0.41s)
✔ ImporterTest: Import checkout to location (0.41s)
✔ ImporterTest: Update asset including custom fields (0.39s)
✔ ImporterTest: Asset model number4359 (0.44s)
✔ ImporterTest: Custom mapping import (0.39s)
✔ ImporterTest: Default accessory import (0.39s)
✔ ImporterTest: Default accessory update (0.38s)
✔ ImporterTest: Custom accessory import (0.37s)
✔ ImporterTest: Default consumable import (0.39s)
✔ ImporterTest: Default consumable update (0.38s)
✔ ImporterTest: Custom consumable import (0.43s)
✔ ImporterTest: Default license import (0.41s)
✔ ImporterTest: Default license update (0.42s)
✔ ImporterTest: Custom license import (0.40s)
✔ ImporterTest: Default user import (0.39s)
✔ NotificationTest: A user is emailed if they checkout an asset with eula (0.39s)
✔ PermissionsTest: A_user_with_no_permissions_sees_nothing (0.38s)
✔ PermissionsTest: A_user_with_view_asset_permissions_can_view_assets (0.39s)
✔ PermissionsTest: A_user_with_create_asset_permissions_can_create_assets (0.39s)
✔ PermissionsTest: A_user_with_edit_assets_permissions_can_edit_assets (0.43s)
✔ PermissionsTest: A_user_with_delete_assets_permissions_can_delete_assets (0.38s)
✔ PermissionsTest: A_user_with_view_licenses_permissions_can_view_licenses (0.44s)
✔ PermissionsTest: A_user_with_create_licenses_permissions_can_create_licenses (0.38s)
✔ PermissionsTest: A_user_with_edit_licenses_permissions_can_edit_licenses (0.39s)
✔ PermissionsTest: A_user_with_delete_licenses_permissions_can_delete_licenses (0.38s)
✔ PermissionsTest: A_user_with_view_accessories_permissions_can_view_accessories (0.39s)
✔ PermissionsTest: A_user_with_create_accessories_permissions_can_create_accessories (0.39s)
✔ PermissionsTest: A_user_with_edit_accessories_permissions_can_edit_accessories (0.41s)
✔ PermissionsTest: A_user_with_delete_accessories_permissions_can_delete_accessories (0.39s)
✔ PermissionsTest: A_user_with_view_consumables_permissions_can_view_consumables (0.39s)
✔ PermissionsTest: A_user_with_create_consumables_permissions_can_create_consumables (0.41s)
✔ PermissionsTest: A_user_with_edit_consumables_permissions_can_edit_consumables (0.41s)
✔ PermissionsTest: A_user_with_delete_consumables_permissions_can_delete_consumables (0.39s)
✔ PermissionsTest: A_user_with_view_users_permissions_can_view_users (0.40s)
✔ PermissionsTest: A_user_with_create_users_permissions_can_create_users (0.39s)
✔ PermissionsTest: A_user_with_edit_users_permissions_can_edit_users (0.39s)
✔ PermissionsTest: A_user_with_delete_users_permissions_can_delete_users (0.40s)
✔ PermissionsTest: A_user_with_view_components_permissions_can_view_components (0.39s)
✔ PermissionsTest: A_user_with_create_components_permissions_can_create_components (0.40s)
✔ PermissionsTest: A_user_with_edit_components_permissions_can_edit_components (0.40s)
✔ PermissionsTest: A_user_with_delete_components_permissions_can_delete_components (0.41s)
✔ SnipeModelTest: It_sets_purchase_dates_appropriately (0.40s)
✔ SnipeModelTest: It_sets_purchase_costs_appropriately (0.40s)
✔ SnipeModelTest: It_nulls_blank_location_ids_but_not_others (0.40s)
✔ SnipeModelTest: It_nulls_blank_categories_but_not_others (0.42s)
✔ SnipeModelTest: It_nulls_blank_suppliers_but_not_others (0.42s)
✔ SnipeModelTest: It_nulls_blank_depreciations_but_not_others (0.39s)
✔ SnipeModelTest: It_nulls_blank_manufacturers_but_not_others (0.40s)
✔ StatuslabelTest: Rtd statuslabel add (0.43s)
✔ StatuslabelTest: Pending statuslabel add (0.42s)
✔ StatuslabelTest: Archived statuslabel add (0.43s)
✔ StatuslabelTest: Out for repair statuslabel add (0.42s)
✔ StatuslabelTest: Out for diagnostics statuslabel add (0.41s)
✔ StatuslabelTest: Broken statuslabel add (0.41s)
✔ StatuslabelTest: Lost statuslabel add (0.42s)
✔ UserTest: First name split (0.48s)
✔ UserTest: First name (0.40s)
✔ UserTest: First name dot last name (0.48s)
✔ UserTest: Last name first initial (0.41s)
✔ UserTest: First initial last name (0.45s)
✔ UserTest: First initial underscore last name (0.41s)
✔ UserTest: Single name (0.44s)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 49.53 seconds, Memory: 266.25MB
OK (117 tests, 746 assertions)
./vendor/bin/codecept run unit: 00:50
└── ./vendor/bin/codecept run functional -g func1
Codeception PHP Testing Framework v2.3.6
Powered by PHPUnit 6.4.4 by Sebastian Bergmann and contributors.
[Groups] func1
Functional Tests (35) -------------------------------------------------------------------------------------------------------------------------------------------------------------
✔ AccessoriesCest: Ensure that the create accessories form loads without errors (0.38s)
✔ AccessoriesCest: Test validation fails with blank elements (0.25s)
✔ AccessoriesCest: Test validation fails with short name (0.24s)
✔ AccessoriesCest: Test validation succeeds (0.33s)
✔ AccessoriesCest: Ensure i can delete an accessory (0.20s)
✔ AssetModelsCest: Test asset model creation (0.18s)
✔ AssetModelsCest: Test validation fails with blank elements (0.24s)
✔ AssetModelsCest: Test validation succeeds (0.30s)
✔ AssetModelsCest: Ensure i can delete an asset model (0.26s)
✔ AssetsCest: Ensure that the create assets form loads without errors (0.19s)
✖ AssetsCest: Test validation fails with blank elements (0.21s)
✔ AssetsCest: Test validation succeeds (0.37s)
✔ AssetsCest: Ensure i can delete an asset (0.21s)
✔ CategoriesCest: Test category creation (0.19s)
✔ CategoriesCest: Test validation fails with blank elements (0.25s)
✔ CategoriesCest: Test validation succeeds (0.32s)
✔ CategoriesCest: Ensure i can delete a category (0.25s)
✔ CompaniesCest: Test company creation (0.17s)
✔ CompaniesCest: Test validation fails with blank elements (0.23s)
✔ CompaniesCest: Test validation succeeds (0.30s)
✔ ComponentsCest: Ensure that the create components form loads without errors (0.18s)
✔ ComponentsCest: Test validation fails with blank elements (0.24s)
✔ ComponentsCest: Test validation fails with short name (0.24s)
✔ ComponentsCest: Test validation succeeds (0.30s)
✔ ComponentsCest: Ensure i can delete a component (0.19s)
✔ ConsumablesCest: Ensure that the create consumables form loads without errors (0.18s)
✔ ConsumablesCest: Test validation fails with blank elements (0.25s)
✔ ConsumablesCest: Test validation fails with short name (0.24s)
✔ ConsumablesCest: Test validation succeeds (0.30s)
✔ ConsumablesCest: Ensure i can delete a consumable (0.18s)
✔ DepreciationCest: Test depreciation creation (0.17s)
✔ DepreciationCest: Test validation fails with blank elements (0.23s)
✔ DepreciationCest: Test validation fails with short name (0.23s)
✔ DepreciationCest: Test validation succeeds (0.29s)
✔ DepreciationCest: Ensure i can delete a depreciation (0.19s)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 9.4 seconds, Memory: 346.25MB
There was 1 failure:
---------
1) AssetsCest: Test validation fails with blank elements
Test tests/functional/AssetsCest.php:failsEmptyValidation
Step See "The asset tag field is required.",".alert-msg"
Fail Element located either by name, CSS or XPath element with '.alert-msg' was not found.
Scenario Steps:
7. $I->see("The asset tag field is required.",".alert-msg") at tests/functional/AssetsCest.php:28
6. $I->click("Save") at tests/functional/AssetsCest.php:27
5. $I->amOnPage("http://snipe-it.test/hardware/create") at tests/functional/AssetsCest.php:26
4. $I->click("Login") at tests/functional/AssetsCest.php:11
3. $I->fillField("password","password") at tests/functional/AssetsCest.php:10
2. $I->fillField("username","admin") at tests/functional/AssetsCest.php:9
FAILURES!
Tests: 35, Assertions: 80, Failures: 1.
└─(1)─ ./vendor/bin/codecept run functional -g func2
Codeception PHP Testing Framework v2.3.6
Powered by PHPUnit 6.4.4 by Sebastian Bergmann and contributors.
[Groups] func2
Functional Tests (34) -------------------------------------------------------------------------------------------------------------------------------------------------------------
✔ GroupsCest: Ensure that the create groups form loads without errors (0.23s)
✔ GroupsCest: Test validation fails with blank elements (0.28s)
✖ GroupsCest: Test validation fails with short name (0.28s)
✔ GroupsCest: Test validation succeeds (0.27s)
I GroupsCest: Ensure I can delete a group (0.13s)
I GroupsCest: Ensure i can edit a group (0.13s)
✔ LicensesCest: Ensure that the create licenses form loads without errors (0.18s)
✔ LicensesCest: Test validation fails with blank elements (0.24s)
✔ LicensesCest: Test validation fails with short name (0.24s)
✔ LicensesCest: Test validation succeeds (0.32s)
✔ LicensesCest: Ensure i can delete a license (0.20s)
✔ LocationsCest: Test location creation (0.17s)
✔ LocationsCest: Test validation fails with blank elements (0.25s)
✔ LocationsCest: Test validation fails with short values (0.25s)
✔ LocationsCest: Test validation succeeds (0.30s)
✔ LocationsCest: Ensure i can delete a location (0.26s)
✔ ManufacturersCest: Test manufacturer creation (0.17s)
✔ ManufacturersCest: Test validation fails with blank elements (0.24s)
✔ ManufacturersCest: Test validation fails with short name (0.24s)
✔ ManufacturersCest: Test validation succeeds (0.29s)
✔ ManufacturersCest: Ensure i can delete a manufacturer (0.25s)
✔ StatusLabelsCest: Ensure that the create statuslabels form loads without errors (0.18s)
✔ StatusLabelsCest: Test validation fails with blank elements (0.23s)
✔ StatusLabelsCest: Test validation succeeds (0.29s)
✔ StatusLabelsCest: Ensure i can delete a status label (0.19s)
✔ SuppliersCest: Ensure that the create settings/suppliers form loads without errors (0.18s)
✔ SuppliersCest: Test validation fails with blank elements (0.24s)
✔ SuppliersCest: Test validation succeeds (0.30s)
✔ SuppliersCest: Ensure i can delete a supplier (0.26s)
✔ UsersCest: Ensure that the create users form loads without errors (0.21s)
✔ UsersCest: Test validation fails with blank elements (0.34s)
✔ UsersCest: Test validation fails with short name (0.33s)
✔ UsersCest: Test validation succeeds (0.41s)
✔ UsersCest: Ensure i can delete a user (0.25s)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 9.22 seconds, Memory: 338.00MB
There was 1 failure:
---------
1) GroupsCest: Test validation fails with short name
Test tests/functional/GroupsCest.php:failsShortValidation
Step See element ".alert-danger"
Fail Element located either by name, CSS or XPath element with '.alert-danger' was not found.
Scenario Steps:
9. $I->seeElement(".alert-danger") at tests/functional/GroupsCest.php:44
8. $I->click("Save") at tests/functional/GroupsCest.php:43
7. $I->fillField("name","t2") at tests/functional/GroupsCest.php:42
6. $I->seeResponseCodeIs(200) at tests/functional/GroupsCest.php:41
5. $I->amOnPage("http://snipe-it.test/admin/groups/create") at tests/functional/GroupsCest.php:40
4. $I->click("Login") at tests/functional/GroupsCest.php:13
FAILURES!
Tests: 34, Assertions: 61, Failures: 1, Incomplete: 2.
run with `-v` to get more info about skipped or incomplete tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment