Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coming in Version 2 #56

Open
89 tasks done
thiagodp opened this issue May 3, 2020 · 1 comment
Open
89 tasks done

Coming in Version 2 #56

thiagodp opened this issue May 3, 2020 · 1 comment
Assignees
Labels
assigned dependencies enhancement feedback desired language performance
Milestone

Comments

@thiagodp
Copy link
Owner

thiagodp commented May 3, 2020

👁‍🗨 Version 2 is being launched because we adopt Semantic Versioning and every compatibility break (with the previous version) must be indicated by incrementing the major version. Thus, 2.0 instead of 1.5.

Last Update: October 11th, 2021

👉 Try it now:

npm i -D concordialang@alpha

v2

Version 2 is heading language extension and better integration with automation tools. Multiple environment, concurrent test script execution is one of our targets. A new language documentation is under construction. As always, your feedback is welcome and it helps to improve the language and the tool.

Some notes:

  • checked () means "already implemented".
  • unchecked means "not implemented yet".
  • Changes or features can still be added.
  • Existing plug-ins are being updated.
  • New plug-ins for CodeceptJS with Playwright and TestCafe are available.

Language

Breaking Changes

  • Date values for UI Elements of the data types date and datetime do not accept dot (.) anymore. For instance, "2020.12.31" is not considered valid from now on. You can still use slash (/) or dash (-) instead, such as in "2020/12/31" or "2020-12-31".

  • Now the data type time represents a time value without seconds, which is more common for user input. The new data type long time was introduced to represent time values with seconds (see News).

  • Now the data type datetime represents a datetime value without seconds, which is more common for user input. The new data type long datetime was introduced to represent time values with seconds (see News).

What's New

  • New UI Element data type long time (or hora longa in Portuguese) to represent time values with seconds, in substitution of time.

  • New UI Element data type long date time (or data e hora longa in Portuguese) to represent datetime values with seconds, in substitution of datetime .

  • New UI Element property locale that indicates the locale of UI Element's values using BCP 47 / RFC 5646, such as pt-BR, pt-PT, en-US, en-GB, etc. Example: - locale is "en-GB".

  • New UI Element property locale format that indicates the locale format of UI Element's values. Date and time values use Unicode Date Format from TR 35. Example: - locale format is "MM-dd-yyyy".

  • Support to date expressions (in English and Portuguese) from Add language support to represent the current date and time #40 and more. Examples:

    • Expressions without numbers
      • last year / ano passado
      • last month / mês passado
      • last week / semana passada
      • the day before yesterday / anteontem
      • yesterday / ontem
      • today / hoje
      • tomorrow / amanhã
      • the day after tomorrow / depois de amanhã
      • next week / semana que vem
      • next month / mês que vem
      • next year / ano que vem
    • Expressions with numbers
      • 2 years ago (or any number) / 2 anos atrás (ou outro número)
      • 2 months ago (or any number) / 2 meses atrás (ou outro número)
      • 2 weeks ago (or any number) / 2 semanas atrás (ou outro número)
      • 2 days ago (or any number) / 2 dias atrás (ou outro número)
      • in 2 days (or any number) / em 2 dias (ou outro número)
      • in 2 weeks (or any number) / em 2 semanas (ou outro número)
      • in 2 months (or any number) / em 2 meses (ou outro número)
      • in 2 years (or any number) / em 2 anos (ou outro número)
    • Values without quotation marks ("). These values' format varies according to the current language. For instance, December 31th, 2020 can be denoted in English by 12/31/2020, while in Portuguese by 31/12/2020.
      • Date with day, month and year, such as 12/25/2020
      • Date with day and month only, such as 12/25
    • Value extraction from expressions without numbers
      • day of / dia de + date expression. Examples:
        • day of today / dia de hoje
        • day of last week / dia da semana passada
      • month of / mês do + date expression. Examples:
        • month of last month / mês do mês passado
        • month of yesterday / mês de ontem
      • year of / ano de + date expression. Examples:
        • year of today / ano de hoje
        • year of next year / ano do ano que vem
    • Value extraction fro expressions with numbers
      • day of / dia de + numbered date expression. Example:
        • day of 2 days ago / dia de 2 dias atrás
      • month of / mês do + numbered date expression. Examples:
        • month of 2 months ago / mês de dois meses atrás
      • year of / ano de + numbered date expression. Examples:
        • year of 2 years ago / ano de 2 anos trás
  • Support to time expressions (in English and Portuguese) from Add language support to represent the current date and time #40 and more.

    • Value without quotation marks (")
    • values with seconds, like 23:59:59
    • values without seconds, like 23:59
    • Expressions without numbers
      • now, current time / agora, hora atual
      • last hour / última hora
      • last minute / último minuto
      • last second / último segundo
    • Expressions with numbers
      • 2 hours ago / 2 horas atrás
      • 2 minutes ago / 2 minutos atrás
      • 2 seconds ago / 2 segundos atrás
      • in 2 seconds / em 2 segundos
      • in 2 minutes / em 2 minutos
      • in 2 hours / em 2 horas
    • Value extraction from time expressions
      • hour of / hora de + time expression. Examples:
        • hour of now / hora de agora
        • hour of the last hour / hora da hora passada
      • minute of / minuto de + time expression. Examples:
        • minute of last minute / minuto do minuto anterior
        • minute of the last hour / minuto da última hora
      • second of / segundo de + time expression. Example:
        • second of now / segundo de agora
  • Support to datetime expressions (in English and Portuguese) from Add language support to represent the current date and time #40.

    • current date and time / data e hora atuais or data e hora atual
    • Value without quotation marks (")
      • values with seconds, like 12/31/2020 23:59:59 (English) or 31/12/2020 23:59:59 (Portuguese)
      • values without seconds, like 12/31/2020 23:59 (English) or 31/12/2020 23:59 (Portuguese)

Compiler

What's New

  • Support to multiple package managers: NPM, Yarn, or PNPM.
  • Parameter suggestion. Example: concordia --hlp gives you Invalid option: "--hlp". Did you mean "--help"?
  • Parameter --file now automatically filters the test cases to generate and the test scripts to run. For instance, whether you pass --file=login.feature it will only execute the corresponding test script (e.g. login.js).
  • Parameter --file is now able to automatically include dependencies.
  • New parameter --script-file to filter the test script file or files to execute. Example: --script-file="file1.js,path/to/file2.js
  • New parameter --script-grep to send a text or a regular expression to filter the test scripts to run. Example: --script-grep Login to execute only the test scripts with the word "Login". (*)
  • New parameter --target to indicate the target browsers or platforms to execute the test scripts. Example 1: --target firefox. Example 2: --target "firefox,chrome". (*)
  • New parameter --headless to indicate the execution in headless a browser, whether available. Example: --target chrome --headless. It does not have effect for targets other than browsers. (*)
  • New parameter --instances to indicate the number of parallel instances to execute. Example: --instances 2 will split the test scripts into two groups that will execute in parallel. (*)
  • New parameter --config to indicate the path of the configuration file. Example: --config path/to/.concordiarc.
  • New parameter --plugin-update to update a plugin package.
  • New parameter --db-list to list installed database drivers.
  • New parameter --db-install to install one or more database drivers.
  • New parameter --db-uninstall to uninstall one or more database drivers.
  • New parameter --locale-list to list available locales.
  • New parameter -x as an alias to --no-run.
  • Removed parameter --no-result.
  • Test Case files (.testcase) are now deleted automatically when they have no test cases. This also avoids generating the corresponding test script files.
  • Compiler now shows the total number of generated test cases.
  • Compiler now shows the number of generated test cases by file, using --verbose.
  • Improves the detection of UI Element data types when the property date type is not declared.
  • Test data generated for date and time values now can consider the language of the current document as their locale. By default, documents in en (English) use the locale en-US (American English), while documents in pt (Portuguese) use the locale pt-BR (Brazilian Portuguese).
  • Test data generated from the UI Element property format now considers the parameter --random-max-string-size.
  • Add codeceptjs-testcafe as a plug-in option to the step-by-step guide triggered by --init.
  • Add codeceptjs-playwright as a plug-in option to the step-by-step guide triggered by --init.
  • Add database driver options to the step-by-step guide triggered by --init since database drivers are not installed by default anymore (see Breaking Changes).
  • Generates an additional report for other tools: concordia.report.json.

*= Plug-in should offer support to it.

Changes

  • Compiler now shows the number of features files and test cases files found, instead of the number of files found.
  • Up to 50% performance improvement when reading specification files by ignoring Test Case files (.testcase) with the same name of feature files (.feature), since they are generated again.
  • Improves concurrent file compilation.
  • Improves performance of colorful CLI output.
  • Improves detection of UI Literals.
  • Improves test generator for format properties.
  • Changes parameters' organization for the CLI option --help.
  • Show less processing information by default. You can still use --verbose for a detailed output.
  • Avoid displaying ads from plug-ins' dependencies during installation.

Breaking Changes

  • Requires NodeJS 10.14 or later. NodeJS project has dropped its support to NodeJS 8 and many libraries and tools used by Concordia Compiler are also upgrading. Unfortunately, fixes and improvements are being only published to versions that support NodeJS 10+.

  • Database drivers are not installed by default anymore. Now the needed drivers must be manually installed or picked when using --init. This change reduces the installation size considerably.

  • New plug-in structure.

  • Test data produced for the data type time considers the minutes, instead of the seconds. For example, the next value for 12:30 will be 12:31 instead of 12:30:01. You can use the new type long time to consider the seconds, instead of the minutes.

  • Test data produced for the data type datetime consider the minutes, instead of the seconds, like for time. For example, the next value for 2020/12/31 12:30 will be 2020/12/31 12:31 instead of 2020/12/31 12:30:01. You can use the new type long datetime to consider the seconds.

  • Updates the plug-in API.

  • Default directory for features changed from ./features to . (current directory).

  • Default directory for test scripts changed from ./tests to . (current directory).

  • Default directory for test execution output changed from ./output to . (current directory).

  • Removes the CLI option --dir-test-cases.

  • Removes the CLI option --extensions.

Internal Changes

  • Change CI from Travis CI to GitHub Actions
  • Increases the number of test scripts
    • test suites from 79 to 110 (+39%)
    • test cases from 697 to 1354 (+94%)
  • Reduces the number of external run-time dependencies
    • direct dependencies from 56 to 40 (-29%)
    • total dependencies from 585 to 519 (-11%)
  • Upgrades dependencies
  • Refactors some modules

Fixes

  • Generation of regex-based values with unescaped quotes.
  • Generation of a date above the minimum when the minimum was the last day of the year.
  • Generation of a date below the maximum when the maximum was the first day of the year.

Being Considered

  • To adopt one of the following formats to use the property locale format with numbers:

    1. Format proposed by intl-number-helper.
      • Pros: short and simple.
      • Cons: not standard.
    2. Number pattern from Unicode TR35
      • Pros: standard; more flexible.
      • Cons: harder to learn; some characters are difficult to write, e.g.: ¤
  • Special comment #locale to indicate the current locale. Example: en-GB. The locale will not be used to understand the document's language. When not given, the locale will assume the document's language. American English (en-US) will be assumed for documents in English. Brazilian Portuguese (pt-BR) will be assumed for documents in Portuguese.

  • New CLI parameter --locale to set the default locale.

  • Improved data test case generator.

@thiagodp thiagodp added enhancement language performance assigned feedback desired dependencies labels May 3, 2020
@thiagodp thiagodp self-assigned this May 3, 2020
@thiagodp
Copy link
Owner Author

thiagodp commented May 26, 2020

This issue is receiving a lot of updates. Stay tuned 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned dependencies enhancement feedback desired language performance
Projects
None yet
Development

No branches or pull requests

1 participant