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

Build stanzas from raw XML strings #57

Merged
merged 7 commits into from
Feb 6, 2015
Merged

Build stanzas from raw XML strings #57

merged 7 commits into from
Feb 6, 2015

Conversation

erszcz
Copy link
Member

@erszcz erszcz commented Feb 6, 2015

This allows for convenient creation of custom stanzas inline in test suites instead of laboriously writing functional constructors and placing them in escalus_stanza.
Please note this might not be the fastest, performance-wise, approach to getting an xmlterm() so watch out for CPU churn in high-load scenarios (AMOC comes to mind).

@arcusfelis
Copy link
Contributor

I have a suggestion to allow a reverse operation: matching XML by
template. Something like
Element = #xmlel{name= <<"outer">>, children=Inner}.
{matched, [{inner, Inner}]} =
M:match_template("{{{inner}}}", Element).

On 02/06/2015 02:21 PM, Radosław Szymczyszyn wrote:

This allows for convenient creation of custom stanzas inline in test
suites instead of laboriously writing functional constructors and
placing them in |escalus_stanza|.
Please note this might not be the fastest, performance-wise, approach
to getting an |xmlterm()| so watch out for CPU churn in high-load
scenarios (AMOC comes to mind).


    You can view, comment on, or merge this pull request online at:

#57

    Commit Summary


Reply to this email directly or view it on GitHub
#57.

@erszcz
Copy link
Member Author

erszcz commented Feb 6, 2015

I'm not sure I see a use case which couldn't be satisfied with exml_query. It's worth exploring, but probably as a separate issue.

pzel pushed a commit that referenced this pull request Feb 6, 2015
Build stanzas from raw XML strings
@pzel pzel merged commit 41a94b2 into master Feb 6, 2015
@pzel pzel deleted the stanzas-from-xml branch February 6, 2015 14:30
@arcusfelis
Copy link
Contributor

You are right. But, this matching syntax allows to match on a difficult XML stanza and more declarative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants