Description
What are you trying to achieve?
I am trying to get the code coverage for my project which I keep my e2eTest project within. I am going according to the documentation: capturing code coverage. After I run all of the test with the plugin enabled, I get the json files in the output/coverage folder.
What do you get instead?
However, when I use the code piece for converting coverage to istanbul formate, I get this error
I guess the converter expects the system files to be in my e2eTest project. What am I doing wrong? Is there a healthy way to change the expected path for this?
Also, we decided that those files that I mentioned above are unneeded files so I tried to exclude those files by change the regex for the file variable to point to "module" folder's files.
But when I do that I get this error:
which means I capture nothing with my regex.
as you can see there is only one subhtml createdHere is what my file system looks like after the running coverage with the unneeded files and after running
npx nyc report --reporter html -t coverage
Details
- CodeceptJS version: 3.4.1
- NodeJS Version: v18.10.0 (npm v8.19.2)
- Operating System: MacOS
- Playwright
- Configuration file:
# paste config here
/** @type {CodeceptJS.MainConfig} */
const { exec } = require("child_process");
exports.config = {
tests: "./tests/*_test.js",
output: "./output",
helpers: {
Playwright: {
url: "http://localhost:3002/#!",
show: true,
browser: "chromium",
},
LocatorOperationsHelper: {
require: "./locatoroperations_helper.js",
},
MobileOperations: {
require: "./mobileoperations_helper.js",
},
FileSystem: {},
},
plugins: {
subtitles: {
enabled: true,
},
pauseOnFail: {},
tryTo: {
enabled: true,
},
coverage: {
enabled: true,
},
},
async bootstrap() {
exec("node ../e2e/reset-db.js");
},
include: {
I: "./steps_file.js",
LoginPage: "./pages/LoginPage.js",
NavbarFragment: "./fragments/NavbarFragment.js",
AddUserPage: "./pages/AddUserPage.js",
UserListPage: "./pages/UserListPage.js",
LdapAddUserPage: "./pages/LdapAddUserPage.js",
LdapSettingsPage: "./pages/LdapSettingsPage.js",
CsvAddUserPage: "./pages/CsvAddUserPage.js",
GroupsPage: "./pages/GroupsPage.js",
EditUserPage: "./pages/EditUserPage.js",
AddRolePage: "./pages/AddRolePage.js",
ChangePasswordPage: "./pages/ChangePasswordPage.js",
EditProfilePage: "./pages/EditProfilePage.js",
RoleListPage: "./pages/RoleListPage.js",
DevicesPage: "./pages/DevicesPage.js",
PoliciesPage: "./pages/PoliciesPage.js",
ApnPage: "./pages/ApnPage.js",
ExchangeConfigurationsPage: "./pages/ExchangeConfigurationsPage.js",
KioskPage: "./pages/KioskPage.js",
HomeScreenLayoutsPage: "./pages/HomeScreenLayoutsPage.js",
WifiConfigurationsPage: "./pages/WifiConfigurationsPage.js",
KeyguardFeaturesPage: "./pages/KeyguardFeaturesPage.js",
PermissionGrantStatesPage: "./pages/PermissionGrantStatesPage.js",
WebContentFiltersPage: "./pages/WebContentFiltersPage.js",
PasscodePoliciesPage: "./pages/PasscodePoliciesPage.js",
SingleAppModesPage: "./pages/SingleAppModesPage.js",
WallpapersPage: "./pages/WallpapersPage.js",
VpnConfigurationsPage: "./pages/VpnConfigurationsPage.js",
SharedDeviceConfigurationsPage: "./pages/SharedDeviceConfigurationsPage.js",
SystemUpdatePoliciesPage: "./pages/SystemUpdatePoliciesPage.js",
IosAccountsPage: "./pages/IosAccountsPage.js",
IosAppNotificationSettingsPage: "./pages/IosAppNotificationSettingsPage.js",
FirewallRulesPage: "./pages/FirewallRulesPage.js",
PredefinedAppsPage: "./pages/PredefinedAppsPage.js",
CallBlacklistsPage: "./pages/CallBlacklistsPage.js",
MyLocationsPage: "./pages/MyLocationsPage.js",
CriteriaPage: "./pages/CriteriaPage.js",
ApplicationsPage: "./pages/ApplicationsPage.js",
BooksPage: "./pages/BooksPage.js",
GeneralDeviceConfigPage: "./pages/GeneralDeviceConfigPage.js",
AssignPoliciesPage: "./pages/AssignPoliciesPage.js",
LicenseInfoPage: "./pages/LicenseInfoPage.js",
AppleConfiguratorProfilesPage: "./pages/AppleConfiguratorProfilesPage.js",
CertificatesPage: "./pages/CertificatesPage.js",
DeviceFilePage: "./pages/DeviceFilePage.js",
ProxyConfigurationPage: "./pages/ProxyConfigurationPage.js",
CommandsPage: "./pages/CommandsPage.js",
SecureExchangeSettingsPage: "./pages/SecureExchangeSettingsPage.js",
CloudConnectPage: "./pages/CloudConnectPage.js",
KibanaDashboardsPage: "./pages/KibanaDashboardsPage.js",
UserSpecificVpnPage: "./pages/UserSpecificVpnPage.js",
UpdateMdmAgentsPage: "./pages/UpdateMdmAgentsPage.js",
SimCardNumbersPage: "./pages/SimCardNumbersPage.js",
SystemSettingsPage: "./pages/SystemSettingsPage.js",
LandingDashboardPage: "./pages/LandingDashboardPage.js",
},
name: "e2eTest",
};