Skip to content

Commit

Permalink
Delete "testing with scenarios" section
Browse files Browse the repository at this point in the history
This is superseded by
https://docs.daml.com/daml/intro/2_DamlScript.html which seems much
nicer and I don’t see what we gain by having both.

fixes #8839

changelog_begin
changelog_end
  • Loading branch information
cocreature committed Apr 8, 2021
1 parent 69ecf57 commit 8a7b875
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 254 deletions.
1 change: 0 additions & 1 deletion docs/configs/pdf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Writing Daml
daml/intro/0_Intro.rst
daml/reference/index
daml/stdlib/index
daml/testing-scenarios
daml/troubleshooting
/daml/patterns

Expand Down
4 changes: 2 additions & 2 deletions docs/source/app-dev/app-arch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ Developer workflow

The SDK enables a local development environment with fast iteration cycles:

1. The integrated VSCode IDE (``daml studio``) runs your Scripts on any change to your Daml models. See :ref:`Daml scenarios <testing-using-scenarios>`.
1. The integrated VSCode IDE (``daml studio``) runs your Scripts on any change to your Daml models. See :ref:`Daml Script <testing-using-script>`.
#. ``daml start`` will build all of your Daml code, generate the JavaScript bindings, and start the required "backend" processes (sandbox and HTTP JSON API). It will also allow you to press ``r`` (followed by Enter on Windows) to rebuild your code, regenerate the JavaScript bindings and upload the new code to the running ledger.
#. ``npm start`` will watch your JavaScript source files for change and recompile them immediately when they are saved.

Together, these features can provide you with very tight feedback loops while developing your Daml application, all the way from your Daml contracts up to your web UI. A typical Daml developer workflow is to

1. Make a small change to your Daml data model
#. Optionally test your Daml code with :ref:`scenarios <testing-using-scenarios>`
#. Optionally test your Daml code with :ref:`Daml Script <testing-using-script>`
#. Edit your React components to be aligned with changes made in Daml code
#. Extend the UI to make use of the newly introduced feature
#. Make further changes either to your Daml and/or React code until you're happy with what you've developed
Expand Down
10 changes: 5 additions & 5 deletions docs/source/concepts/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,20 @@ A `party <#party>`__ `submits <#submitting-commands-writing-to-the-ledger>`__ an

See :doc:`/daml/reference/updates`.

Scenario
========
Daml Script
===========

A **scenario** is a way of testing Daml code during development. You can run scenarios inside `Daml Studio <#daml-studio>`__, or write them to be executed on `Sandbox <#sandbox>`__ when it starts up.
**Daml Script** provides a way of testing Daml code during development. You can run Daml Script inside `Daml Studio <#daml-studio>`__, or write them to be executed on `Sandbox <#sandbox>`__ when it starts up.

They're useful for:

- expressing clearly the intended workflow of your `contracts <#contract>`__
- ensuring that parties can exclusively create contracts, observe contracts, and exercise choices that they are meant to
- acting as regression tests to confirm that everything keeps working correctly

Scenarios emulate a real ledger. You specify a linear sequence of actions that various parties take, and these are evaluated in order, according to the same consistency, authorization, and privacy rules as they would be on a Daml ledger. Daml Studio shows you the resulting `transaction <#transactions>`__ graph, and (if a scenario fails) what caused it to fail.
In Daml Studio, Daml Script runs in an emulated ledger. You specify a linear sequence of actions that various parties take, and these are evaluated in order, according to the same consistency, authorization, and privacy rules as they would be on a Daml ledger. Daml Studio shows you the resulting `transaction <#transactions>`__ graph, and (if a Daml Script fails) what caused it to fail.

See :doc:`/daml/testing-scenarios`.
See :ref:`testing-using-script`.

.. Damle, Daml runtime, Daml execution engine
.. ==========================================
Expand Down
84 changes: 0 additions & 84 deletions docs/source/daml/code-snippets/CallablePayout_Call.daml

This file was deleted.

47 changes: 0 additions & 47 deletions docs/source/daml/code-snippets/Payout.daml

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/daml/intro/2_DamlScript.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.. Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
.. SPDX-License-Identifier: Apache-2.0
.. _testing-using-script:

2 Testing templates using Daml Script
=====================================

Expand Down
2 changes: 1 addition & 1 deletion docs/source/daml/reference/scenarios.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Reference: scenarios

This page gives reference information on scenario syntax, used for testing templates.

For an introduction to scenarios, see :doc:`../testing-scenarios`.
Note that for new project, we recommend Daml Script. For an introduction to Daml Script, see :ref:`testing-using-script`.

.. _daml-ref-scenario:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/daml/reference/working-with.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Daml has these built-in functions for working with time:
- ``subTime``: subtracts one time from another. Returns the ``RelTime`` difference between ``time1`` and ``time2``.
- ``addRelTime``: add times. Takes a ``Time`` and ``RelTime`` and adds the ``RelTime`` to the ``Time``.
- ``days``, ``hours``, ``minutes``, ``seconds``: constructs a ``RelTime`` of the specified length.
- ``pass``: (in :doc:`scenario tests <../testing-scenarios>` only) use ``pass : RelTime -> Scenario Time`` to advance the ledger time by the argument amount. Returns the new time.
- ``pass``: (in :ref:`Daml Script tests <testing-using-script>` only) use ``pass : RelTime -> Script Time`` to advance the ledger time by the argument amount. Returns the new time.

Working with numbers
********************
Expand Down
112 changes: 0 additions & 112 deletions docs/source/daml/testing-scenarios.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Daml Documentation
daml/intro/0_Intro.rst
daml/reference/index
daml/stdlib/index
daml/testing-scenarios
daml/troubleshooting
/daml/patterns

Expand Down

0 comments on commit 8a7b875

Please sign in to comment.