Giter Site home page Giter Site logo

Comments (9)

sthirugn avatar sthirugn commented on June 24, 2024

Can you please explain the use case by showing the command that you are trying to use?

from betelgeuse.

spoore1 avatar spoore1 commented on June 24, 2024

Well, I hadn't actually started running it for this particular query yet.

Here's an example though:

# cat test_simple.py 
class TestExample(object):
    def test_case_0001(self):
        """ Test Case 0001
        @casecomponent: ipa
        @Setup:
        1. Install OS
        @Steps:
        1. Run something one time
        @Assert:
        1. something works
        """
        pass

Then I run this:

# betelgeuse test-case --collect-only --path test_simple.py <project>
Creating test case test_case_0001 for requirement: Simple.
Linking test case test_case_0001 to requirement: Simple.

I'm looking for a way to tell betelgeuse to use "Test Case 0001" for the test case title in polarion instead of test_case_0001.

So, I was thinking something like:

# betelgeuse test-case --use-test-name --collect-only --path test_simple.py <project>
Creating test case "Test Case 0001" for requirement: Simple.
Linking test case "Test Case 0001" to requirement: Simple.

from betelgeuse.

elyezer avatar elyezer commented on June 24, 2024

I think a good solution would be to add an option that allows you specify a polarion field to be mapped to the first line of the docstring. This way we have the flexibility of defining what to map for the first line.

Worth mention that it will only grab the first line not the first paragraph. On the Betelgeuse code this will be checked before assigning any token, so if the field is present on the docstring as a token it will be overridden.

from betelgeuse.

spoore1 avatar spoore1 commented on June 24, 2024

That would work. And like you said would allow more flexibility since I think some people use Description similar to how my team uses Title.

One thing, though. I thought testimony used the first line of docstring as Test now. Are you suggesting that change too?

from betelgeuse.

elyezer avatar elyezer commented on June 24, 2024

Short answer, yes.

Long answer, Testimony currently does use the first line as test, but a new option should be added to it since one may not pass the test as being a valid token, currently it will be bypassed and the test token will be created.

from betelgeuse.

elyezer avatar elyezer commented on June 24, 2024

I've opened SatelliteQE/testimony#118 to fix on testimony and then bring to Betelgeuse

from betelgeuse.

elyezer avatar elyezer commented on June 24, 2024

In order to follow all other token definitions Betelgeuse should support a @title token and fill the title if that token is present on the docstring or use the function/method name.

from betelgeuse.

spoore1 avatar spoore1 commented on June 24, 2024

Thanks guys!

from betelgeuse.

elyezer avatar elyezer commented on June 24, 2024

@spoore1 thank you for the feature request, it is good to have control over the title.

from betelgeuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.