artbear / 1bdd Goto Github PK
View Code? Open in Web Editor NEW1BDD для OneScript - консольный фреймворк, реализующий BDD для проекта OneScript. Для Windows и Linux.
License: Mozilla Public License 2.0
1BDD для OneScript - консольный фреймворк, реализующий BDD для проекта OneScript. Для Windows и Linux.
License: Mozilla Public License 2.0
Нужно сделать фичи:
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
Пример using_descriptions.feature из доки cucumber-ruby
Feature: Using descriptions to give features context
When writing your feature files its very helpful to use description
text at the beginning of the feature file, to write a preamble to the
feature describing clearly exactly what the feature does.
You can also write descriptions attached to individual scenarios - see
the examples below for how this can be used.
It's possible to have your descriptions run over more than one line,
and you can have blank lines too. As long as you don't start a line
with a Given, When, Then, Background:, Scenario: or similar, you're
fine: otherwise Gherkin will start to pay attention.
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
Итоговое число фич, сценариев и шагов
4 Функциональность ( 4 Пройден, 0 Не реализован, 0 Сломался, 0 Не выполнялся )
6 Сценарий ( 6 Пройден, 0 Не реализован, 0 Сломался, 0 Не выполнялся )
19 Шаг ( 19 Пройден, 0 Не реализован, 0 Сломался, 0 Не выполнялся )
Пример из cucumber
--fail-fast Exit immediately following the first failing scenario
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
Пример gherkin3/.../datatables.feature
#!gherkin
Feature: DataTables
Scenario: minimalistic
Given a simple data table
| foo | bar |
| boz | boo |
And a data table with a single cell
| foo |
And a data table with different fromatting
| foo|bar| boz |
And a data table with an empty cell
|foo||boz|
And a data table with comments and newlines inside
| foo | bar |
| boz | boo |
# this is a comment
| boz2 | boo2 |
+ВыполнениеФич
+ПроверкаГенерации
+ПроверкаБиблиотечныхШагов
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
https://github.com/cucumber/cucumber-js/blob/master/docs/cli.md
https://cucumber.io/docs/reference
https://github.com/cucumber/cucumber-js
http://cucumber.github.io/cucumber-js/
https://github.com/cucumber/cucumber-js/blob/master/features/background.feature
http://docs.behat.org/en/v3.0/guides/1.gherkin.html
Usage: cucumber [options] [ [FILE|DIR|URL][:LINE[:LINE]*] ]+
Examples:
cucumber examples/i18n/en/features
cucumber @rerun.txt (See --format rerun)
cucumber examples/i18n/it/features/somma.feature:6:98:113
cucumber -s -i http://rubyurl.com/eeCl
-r, --require LIBRARY|DIR Require files before executing the features. If this
option is not specified, all *.rb files that are
siblings or below the features will be loaded auto-
matically. Automatic loading is disabled when this
option is specified, and all loading becomes explicit.
Files under directories named "support" are always
loaded first.
This option can be specified multiple times.
--i18n LANG List keywords for in a particular language
Run with "--i18n help" to see all languages
--fail-fast Exit immediately following the first failing scenario
-f, --format FORMAT How to format features (Default: pretty). Available formats:
debug : For developing formatters - prints the calls made to the listeners.
html : Generates a nice looking HTML report.
json : Prints the feature as JSON
json_pretty : Prints the feature as prettified JSON
junit : Generates a report similar to Ant+JUnit.
pretty : Prints the feature as is - in colours.
progress : Prints one character per scenario.
rerun : Prints failing files with line numbers.
stepdefs : Prints All step definitions with their locations. Same as
the usage formatter, except that steps are not printed.
usage : Prints where step definitions are used.
The slowest step definitions (with duration) are
listed first. If --dry-run is used the duration
is not shown, and step definitions are sorted by
filename instead.
Use --format rerun --out rerun.txt to write out failing
features. You can rerun them with cucumber @rerun.txt.
FORMAT can also be the fully qualified class name of
your own custom formatter. If the class isn't loaded,
Cucumber will attempt to require a file with a relative
file name that is the underscore name of the class name.
Example: --format Foo::BarZap -> Cucumber will look for
foo/bar_zap.rb. You can place the file with this relative
path underneath your features/support directory or anywhere
on Ruby's LOAD_PATH, for example in a Ruby gem.
--init Initializes folder structure and generates conventional files for
a Cucumber project.
-o, --out [FILE|DIR] Write output to a file/directory instead of STDOUT. This option
applies to the previously specified --format, or the
default format if no format is specified. Check the specific
formatter's docs to see whether to pass a file or a dir.
-t, --tags TAG_EXPRESSION Only execute the features or scenarios with tags matching TAG_EXPRESSION.
Scenarios inherit tags declared on the Feature level. The simplest
TAG_EXPRESSION is simply a tag. Example: --tags @dev. When a tag in a tag
expression starts with a ~, this represents boolean NOT. Example: --tags ~@dev.
A tag expression can have several tags separated by a comma, which represents
logical OR. Example: --tags @dev,@wip. The --tags option can be specified
several times, and this represents logical AND. Example: --tags @foo,~@bar --tags @zap.
This represents the boolean expression (@foo || !@bar) && @zap.
Beware that if you want to use several negative tags to exclude several tags
you have to use logical AND: --tags ~@fixme --tags ~@buggy.
Positive tags can be given a threshold to limit the number of occurrences.
Example: --tags @qa:3 will fail if there are more than 3 occurrences of the @qa tag.
This can be practical if you are practicing Kanban or CONWIP.
-n, --name NAME Only execute the feature elements which match part of the given name.
If this option is given more than once, it will match against all the
given names.
-e, --exclude PATTERN Don't run feature files or require ruby files matching PATTERN
-p, --profile PROFILE Pull commandline arguments from cucumber.yml which can be defined as
strings or arrays. When a 'default' profile is defined and no profile
is specified it is always used. (Unless disabled, see -P below.)
When feature files are defined in a profile and on the command line
then only the ones from the command line are used.
-P, --no-profile Disables all profile loading to avoid using the 'default' profile.
-c, --[no-]color Whether or not to use ANSI color in the output. Cucumber decides
based on your platform and the output destination if not specified.
-d, --dry-run Invokes formatters without executing the steps.
This also omits the loading of your support/env.rb file if it exists.
-m, --no-multiline Don't print multiline strings and tables under steps.
-s, --no-source Don't print the file and line of the step definition with the steps.
-i, --no-snippets Don't print snippets for pending steps.
-I, --snippet-type TYPE Use different snippet type (Default: regexp). Available types:
classic: Snippets without parentheses. Note that these cause a warning from modern versions of Ruby. e.g. Given /^missing step$/
percent: Snippets with percent regexp e.g. Given %r{^missing step$}
regexp : Snippets with parentheses e.g. Given(/^missing step$/)
-q, --quiet Alias for --no-snippets --no-source.
--no-duration Don't print the duration at the end of the summary
-b, --backtrace Show full backtrace for all errors.
-S, --strict Fail if there are any undefined or pending steps.
-w, --wip Fail if there are any passing scenarios.
-v, --verbose Show the files and features loaded.
-g, --guess Guess best match for Ambiguous steps.
-l, --lines LINES Run given line numbers. Equivalent to FILE:LINE syntax
-x, --expand Expand Scenario Outline Tables in output.
--order TYPE[:SEED] Run examples in the specified order. Available types:
[defined] Run scenarios in the order they were defined (default).
[random] Shuffle scenarios before running.
Specify SEED to reproduce the shuffling from a previous run.
e.g. --order random:5738
--version Show version.
-h, --help You're looking at it.
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
сейчас генерятся следующие строки
//получаю 10 и сумму12
//##ПолучаюИ
Процедура ПолучаюИ(10,сумму12) Экспорт
ВызватьИсключение "Не реализовано.";
КонецПроцедуры
/я передаю параметр 11.02.2010
//##ЯПередаюПараметр
Процедура ЯПередаюПараметр(11.02.2010) Экспорт
ВызватьИсключение "Не реализовано.";
КонецПроцедуры
Нужно исправить на Процедура ПолучаюИ(Парам1, Парам2) Экспорт
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
Commit: c7c18440626254fdde105666fdfdbe6bdaf031c4 [c7c1844]
Parents: 860051a9ed
Author: Artur Ayukhanov <[email protected]>
Date: 6 мая 2016 г. 20:33:28
Исправлена ошибка по неверному использования параметров чисел и дат see #17
В 1скрипт добавлен выброс исключения-объекта EvilBeaver/OneScript#188
... bdd.os
предназначен.
Для кого аббревиатура BDD ниочем не говорит, пройдут мимо.
Не написано, что делают команды exec
и generate
Не написано, в каких каталогах какие файлы будут искаться а потом класться.
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
-r, --require LIBRARY|DIR Require files before executing the features. If this
option is not specified, all *.rb files that are
siblings or below the features will be loaded auto-
matically. Automatic loading is disabled when this
option is specified, and all loading becomes explicit.
Files under directories named "support" are always
loaded first.
This option can be specified multiple times.
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
#!gherkin
Feature: DocString variations
Scenario: minimalistic
Given a simple DocString
"""
first line (no indent)
second line (indented with two spaces)
third line was empty
"""
Given a DocString with content type
"""xml
<foo>
<bar />
</foo>
"""
And a DocString with wrong indentation
"""
wrongly indented line
"""
And a DocString with alternative separator
```
first line
second line
```
And a DocString with normal separator inside
```
first line
"""
third line
```
And a DocString with alternative separator inside
"""
first line
```
third line
"""
And a DocString with escaped separator inside
"""
first line
\"\"\"
third line
"""
Функция ПолучитьИсполнителяШагов(Знач ФайлИсполнителя)
Лог.Отладка("Ищу исполнителя шагов в файле "+ФайлИсполнителя.ПолноеИмя);
Если Не ФайлИсполнителя.Существует() Тогда
Возврат Неопределено;
КонецЕсли;
ИсполнительШагов = ЗагрузитьСценарий(ФайлИсполнителя.ПолноеИмя, Контекст); // !!!!!
Возврат ИсполнительШагов;
КонецФункции // ПолучитьИсполнителяШагов()
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
https://github.com/cucumber/cucumber-js/blob/master/features/background.feature
Background allows you to add some context to the scenarios in a
single feature. A Background is much like a scenario containing a
number of steps. The difference is when it is run. The background is
run before each of your scenarios but after any of your Before
Hooks.
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
https://cucumber.io/docs/reference#background
Проверить поведение
Originally reported by: artbear (Bitbucket: artbear, GitHub: artbear)
#!gherkin
Feature: Example tokens everywhere
Scenario Outline: the <one>
Given the <two>:
"""
<three>
"""
Given the <four>:
| <five> |
Examples:
| one | two | three | four | five |
| un | deux | trois | quatre | cinq |
| uno | dos | tres | quatro | cinco |
Функционал: Структура сценария
Как Разработчик
Я Хочу чтобы файл фичи со структурой сценария успешно выполнялся и параметры правильно передавались
Структура сценария: Проверяю передачу параметров <Что> и <Куда>
Когда я передаю параметр <Что>
Тогда я получаю параметр "Минимальный"
Когда я передаю параметр <Куда>
Тогда я получаю параметр "Туда"
Примеры:
| Что | Куда|
| Минимальный | Туда|
Структура сценария: Проверяю передачу параметров <Что> и <Куда>
Когда я передаю параметр <Что>
Тогда я получаю параметр "Минимальный"
Когда я передаю параметр <Куда>
Тогда я получаю параметр "Туда"
Примеры:
| Что | Куда|
| Минимальный | Туда|
Структура сценария: Проверяю передачу обычных параметров и параметров из таблицы в одном шаге
Когда я передаю два параметра разных типов <Параметр> и 1
Тогда я в первом параметре получаю значение с типом "Строка"
И я в втором параметре получаю значение с типом "Число"
Примеры:
| Параметр |
| Значение |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.